DateTime::Format::Sybase - Parse and format Sybase datetimes
use DateTime::Format::Sybase; use DBI; my $dbh = DBI->connect('dbi:Sybase:SERVER', 'sa', ''); $dbh->syb_date_fmt('ISO'); # output format $dbh->do('set dateformat mdy'); # input format my $dt = DateTime::Format::Sybase->parse_datetime( '2004-08-21 14:36:48.080' ); DateTime::Format::Sybase->format_datetime($dt); # '08/21/2004 14:36:48.080'
Run the DBI calls as specified in "SYNOPSIS" on connection to use this module with Sybase.
Parse a string returned by DBD::Sybase for a DATETIME or SMALLDATETIME column in the ISO "syb_date_fmt" in DBD::Sybase format.
DATETIME
SMALLDATETIME
ISO
Remember SMALLDATETIME fields have only minute precision.
Same as "parse_datetime".
Format a DateTime object into a string in the Sybase mdy DATETIME input format, with a time component, for insertion into the database.
mdy
Same as "format_datetime".
Rafael Kitover, <rkitover at cpan.org>
<rkitover at cpan.org>
Please report any bugs or feature requests to bug-datetime-format-sybase at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=DateTime-Format-Sybase. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-datetime-format-sybase at rt.cpan.org
Other resources:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=DateTime-Format-Sybase
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/DateTime-Format-Sybase
CPAN Ratings
http://cpanratings.perl.org/d/DateTime-Format-Sybase
Search CPAN
http://search.cpan.org/dist/DateTime-Format-Sybase/
Copyright (c) 2009-2011 Rafael Kitover
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install DateTime::Format::Sybase, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DateTime::Format::Sybase
CPAN shell
perl -MCPAN -e shell install DateTime::Format::Sybase
For more information on module installation, please visit the detailed CPAN module installation guide.