.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "DateTime::Format::DB2 3pm" .TH DateTime::Format::DB2 3pm "2022-06-13" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" DateTime::Format::DB2 \- Parse and format DB2 dates and times .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use DateTime::Format::DB2; \& \& my $dt = DateTime::Format::DB2\->parse_timestamp( \*(Aq2003\-01\-16\-23.12.01.300000\*(Aq ); \& \& # 2003\-01\-16\-23.12.01.300000 \& DateTime::Format::DB2\->format_timestamp($dt); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module understands the formats used by \s-1DB2\s0 for its \s-1DATE, TIME,\s0 and \s-1TIMESTAMP\s0 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 \s-1DB2\s0 format. .SH "METHODS" .IX Header "METHODS" 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 \s-1DB2\s0 does not provide time zone information. .IP "\(bu" 4 parse_time($string) .IP "\(bu" 4 parse_date($string) .IP "\(bu" 4 parse_timestamp($string) .Sp Given a value of the appropriate type, this method will return a new \&\f(CW\*(C`DateTime\*(C'\fR object. The time zone for this object will always be the floating time zone, because by \s-1DB2\s0 stores the local datetime, not \&\s-1UTC.\s0 .Sp If given an improperly formatted string, this method may die. .IP "\(bu" 4 format_date($datetime) .IP "\(bu" 4 format_time($datetime) .IP "\(bu" 4 format_timestamp($datetime) .Sp Given a \f(CW\*(C`DateTime\*(C'\fR object, this methods returns an appropriately formatted string. .SH "SUPPORT" .IX Header "SUPPORT" Support for this module is provided via the datetime@perl.org email list. See http://lists.perl.org/ for more details. .SH "AUTHOR" .IX Header "AUTHOR" Jess Robinson .PP This module was shamelessly cloned from Dave Rolsky's DateTime::Format::MySQL module. .SH "COPYRIGHT" .IX Header "COPYRIGHT" 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. .SH "SEE ALSO" .IX Header "SEE ALSO" datetime@perl.org mailing list .PP http://datetime.perl.org/