NAME

DateTime::Format::Sybase - Parse and format Sybase datetimes

SYNOPSIS

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'

DESCRIPTION

Run the DBI calls as specified in "SYNOPSIS" on connection to use this module with Sybase.

METHODS

parse_datetime

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.

parse_timestamp

Same as "parse_datetime".

format_datetime

Format a DateTime object into a string in the Sybase mdy DATETIME input format, with a time component, for insertion into the database.

format_timestamp

Same as "format_datetime".

AUTHOR

Rafael Kitover, <rkitover at cpan.org>

BUGS

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.

SUPPORT

Other resources:

COPYRIGHT & LICENSE

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.