1DateTime::Format::DB2(3U)ser Contributed Perl DocumentatiDoanteTime::Format::DB2(3)
2
3
4

NAME

6       DateTime::Format::DB2 - Parse and format DB2 dates and times
7

SYNOPSIS

9         use DateTime::Format::DB2;
10
11         my $dt = DateTime::Format::DB2->parse_timestamp( '2003-01-16-23.12.01.300000' );
12
13         # 2003-01-16-23.12.01.300000
14         DateTime::Format::DB2->format_timestamp($dt);
15

DESCRIPTION

17       This module understands the formats used by DB2 for its DATE, TIME, and
18       TIMESTAMP data types.  It can be used to parse these formats in order
19       to create DateTime objects, and it can take a DateTime object and
20       produce a string representing it in the DB2 format.
21

METHODS

23       This class offers the following methods.  All of the parsing methods
24       set the returned DateTime object's time zone to the floating time zone,
25       because DB2 does not provide time zone information.
26
27       ·   parse_time($string)
28
29       ·   parse_date($string)
30
31       ·   parse_timestamp($string)
32
33           Given a value of the appropriate type, this method will return a
34           new "DateTime" object.  The time zone for this object will always
35           be the floating time zone, because by DB2 stores the local
36           datetime, not UTC.
37
38           If given an improperly formatted string, this method may die.
39
40       ·   format_date($datetime)
41
42       ·   format_time($datetime)
43
44       ·   format_timestamp($datetime)
45
46           Given a "DateTime" object, this methods returns an appropriately
47           formatted string.
48

SUPPORT

50       Support for this module is provided via the datetime@perl.org email
51       list.  See http://lists.perl.org/ for more details.
52

AUTHOR

54       Jess Robinson <castaway@desert-island.demon.co.uk>
55
56       This module was shamelessly cloned from Dave Rolsky's
57       DateTime::Format::MySQL module.
58
60       Copyright (c) 2005 Jess Robinson.  All rights reserved.  This program
61       is free software; you can redistribute it and/or modify it under the
62       same terms as Perl itself.
63

SEE ALSO

65       datetime@perl.org mailing list
66
67       http://datetime.perl.org/
68
69
70
71perl v5.28.0                      2007-01-20          DateTime::Format::DB2(3)
Impressum