DateTime::Format::MySQL(3pm) User Contributed Perl Documentation DateTime::Format::MySQL(3pm)NAME
DateTime::Format::MySQL - Parse and format MySQL dates and times
SYNOPSIS
use DateTime::Format::MySQL;
my $dt = DateTime::Format::MySQL->parse_datetime( '2003-01-16 23:12:01' );
# 2003-01-16 23:12:01
DateTime::Format::MySQL->format_datetime($dt);
DESCRIPTION
This module understands the formats used by MySQL for its DATE, DATETIME, 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 MySQL format.
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 MySQL does not provide time zone information.
* parse_datetime($string)
* parse_date($string)
* parse_timestamp($string)
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 MySQL stores the local datetime, not UTC.
If given an improperly formatted string, this method may die.
* format_date($datetime)
* format_time($datetime)
* format_datetime($datetime)
Given a "DateTime" object, this methods returns an appropriately formatted string.
SUPPORT
Support for this module is provided via the datetime@perl.org email list. See http://lists.perl.org/ for more details.
AUTHOR
Dave Rolsky <autarch@urth.org>
COPYRIGHT
Copyright (c) 2003 David Rolsky. All rights reserved. This program is free software; you can redistribute it and/or modify it under the
same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
SEE ALSO
datetime@perl.org mailing list
http://datetime.perl.org/
perl v5.8.8 2006-10-23 DateTime::Format::MySQL(3pm)
Check Out this Related Man Page
DateTime::Format::Epoch::Lilian(3pm) User Contributed Perl Documentation DateTime::Format::Epoch::Lilian(3pm)NAME
DateTime::Format::Epoch::Lilian - Convert DateTimes to/from Lilian Days
SYNOPSIS
use DateTime::Format::Epoch::Lilian;
my $dt = DateTime::Format::Epoch::Lilian->parse_datetime( 53244.5 );
# 2004-08-27T00:00:00
DateTime::Format::Epoch::Lilian->format_datetime($dt);
# 53244.5
my $formatter = DateTime::Format::Epoch::Lilian->new();
my $dt2 = $formatter->parse_datetime( 53244.5 );
# 2004-08-27T00:00:00
$formatter->format_datetime($dt2);
# 53244.5
DESCRIPTION
This module can convert a DateTime object (or any object that can be converted to a DateTime object) to the Modified Julian Day number. See
DateTime::Format::Epoch::JD for a description.
METHODS
Most of the methods are the same as those in DateTime::Format::Epoch. The only difference is the constructor.
o new()
Constructor of the formatter/parser object. It has no parameters.
SUPPORT
Support for this module is provided via the datetime@perl.org email list. See http://lists.perl.org/ for more details.
AUTHOR
Eugene van der Pijll <pijll@gmx.net>
COPYRIGHT
Copyright (c) 2004 Eugene van der Pijll. All rights reserved. This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
SEE ALSO
DateTime
datetime@perl.org mailing list
perl v5.10.1 2007-12-03 DateTime::Format::Epoch::Lilian(3pm)
While working with russian text under FreeBSD&MySQL I need to convert a string from MySQL to the Unicode format.
I've just started my way in C++ under FreeBSD , so please explain me how can I get ascii code of Char variable and also how can i get a character into variable with the specified ascii... (3 Replies)
Hopefully this post won't be too long :rolleyes:
I've been in data processing for a number of years running on a windows system, and working with perl and MySQL to get the job done.
I'm now part of a team who have bought a company and have been asked to investigate how we setup a new Data... (3 Replies)
I need to write a MySQL query where it loops through every airport and generates 10 random offers (my offers table is 990,000+ rows)
The code I have below works for 1 airport, but as soon as it gets bigger it slows RIGHT down.
This is using PHP/MySQL
At the moment it takes well over a... (2 Replies)
Suppose I have a table as follows:
CREATE TABLE data ( `datetime` datetime DEFAULT NOT NULL, `temperature` float DEFAULT NO NULL );
populated with temperature samples of a couple times a second.
Let's say I want to find the temperatures which are 1 second apart:
SELECT D1.datetime,... (3 Replies)
Hi,
Im doing a project to check the latest time with the word 'processed' in a logfile. the time range is within 2 hours before the curent datetime to present.
For example:
Current datetime is 'October 6 2009 8:00AM' --- HKT
So the time range that need to check is from 'October 6... (1 Reply)
Hi,
I'm trying to use datetime.pm function in Perl. I do not have in the library. Is there a way to get it and put it into library?
Thanks,
George. (1 Reply)
Hi,
I want to convert two datetime fields to find out if the difference is one hour, in linux I've done this by converting both the datetime values to unix epoch time and subtracting them to find out if the difference is more than 3600s, however this does not work in hp-ux.
I've these... (3 Replies)
Hi. I'm hoping there is a simple method where I'm able to generate a datetime string that looks like this (yyyymmddhhmm):
201106280830
The tricky part would be that I need this string to be today's datetime minus 1 year.
Is there anyway to do this? (3 Replies)
I have installed perl in windows.
Now I would like to install spreadsheet::xlsx & DateTime::Format::Excel modules(also few more) at a time instead of installing them seperately.
Could you please let me know how to install more than 1 module as a batch file in windows OS ?
Thanks in... (5 Replies)
I need to convert the given datetime from PST to UTC, i gone through multiple forum examples but everywhere it mentioned about converting the server datetime. So could someone help me on this.
I will be getting arguments for my script in the format of yyyymmddhh (eg:2015101004 - it will be pst),... (4 Replies)
Dear All,
I need to print the below value from excel column
20160219T05:21:59+0100
to
19-FEB-2016 05:21:11
Can anyone help on this datetime format conversion.
Please suggest in print logic itself.
Regards,
Kumaresan P (6 Replies)