DateTime::Format::DB2 - Parse and format DB2 dates and times
use DateTime::Format::DB2; my $dt = DateTime::Format::DB2->parse_timestamp( '2003-01-16-23.12.01.300000' ); # 2003-01-16-23.12.01.300000 DateTime::Format::DB2->format_timestamp($dt);
This module understands the formats used by DB2 for its DATE, TIME, and TIMESTAMP data types. It can be used to parse these formats in order to create DateTime objects, and it can take a DateTime object and produce a string representing it in the DB2 format.
This class offers the following methods. All of the parsing methods set the returned DateTime object's time zone to the floating time zone, because DB2 does not provide time zone information.
Given a value of the appropriate type, this method will return a new
DateTime object. The time zone for this object will always be the floating time zone, because by DB2 stores the local datetime, not UTC.
If given an improperly formatted string, this method may die.
DateTime object, this methods returns an appropriately formatted string.
Support for this module is provided via the email@example.com email list. See http://lists.perl.org/ for more details.
Jess Robinson <firstname.lastname@example.org>
This module was shamelessly cloned from Dave Rolsky's DateTime::Format::MySQL module.
Copyright (c) 2005 Jess Robinson. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
email@example.com mailing list