Kit-Wing Li wrote:
>
> Does anybody know of a quick method in perl to turn a date string into its
> equivalent in seconds, include milliseconds if possible? Ex: 20030910
> 13:50:25.6 to 1063202644. Thanks much!
The Date::Manip module will do it for you easily, as long as you're
not worried about size or performance. See below.
HTH,
Rob
use strict;
use warnings;
use Date::Manip;
my $date = ParseDate('20030910 13:50:25.6');
my $seconds = UnixDate($date, '%s');
print $seconds, "\n";
** OUTPUT **
1063230625
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]