| DateTime-Format-Sybase documentation | view source | Contained in the DateTime-Format-Sybase distribution. |
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.
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.
Same as format_datetime.
Rafael Kitover, <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.
Other resources:
http://rt.cpan.org/NoAuth/Bugs.html?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.
| DateTime-Format-Sybase documentation | view source | Contained in the DateTime-Format-Sybase distribution. |