My favorite way is to use Date::Parse
(http://search.cpan.org/doc/GBARR/TimeDate-1.10/lib/Date/Parse.pm)
use Date::Parse;
my $epoch = str2time("02/05/2002 02:31:14");
It comes with the Time-Date bundle
(http://search.cpan.org/search?dist=TimeDate) which also includes the method
time2str() for formating the epoch time into any format you choose.
Rob
-----Original Message-----
From: Shawn [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 12, 2002 6:03 PM
To: [EMAIL PROTECTED]
Subject: Time conversion question
How might I convert a date/time string to epoch seconds?
For example, taking "02/05/2002 02:31:14" and convert to epoch seconds.
--
Shawn Leas
[EMAIL PROTECTED]
I have a switch in my apartment... it doesn't do anything.... Every
once in a while, I turn it on and off.... One day I got a call...
it was from a woman in France.... She said "Cut it out"....
-- Stephen Wright
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]