
davorg
Thaumaturge
/ Moderator
Feb 5, 2007, 7:23 AM
Post #8 of 8
(17599 views)
|
Re: [bert.baeck] DATETIME in excel
[In reply to]
|
Can't Post
|
|
Excel stores dates and times as a floating point number. The integer is the number of days since Jan 1st 1900 and the decimal part is a fraction of a day (.0 is midnight, .5 is noon, etc). DateTime::Format::Excel takes a number in this format and converts it to a Perl DateTime object. Once you have the DateTime object you can use any of its methods to get the date and time in whatever format you like. The documentation for DateTime::Format::Excel has an example that uses the "ymd" method to get the date. But you can also use the hms method to get the time. Or any of the other myriad methods of the DateTime object. -- Dave Cross, Perl Hacker, Trainer and Writer http://www.dave.org.uk/ Get more help at Perl Monks
|