Re: How to convert timestamp to epoch?
- From: "jl_post@xxxxxxxxxxx" <jl_post@xxxxxxxxxxx>
- Date: Wed, 31 Oct 2007 11:10:42 -0700
On Oct 30, 1:47 pm, Paul Lalli <mri...@xxxxxxxxx> wrote:
#!/usr/bin/perl
use strict;
use warnings;
use Date::Parse 'str2time';
my $date = "22-OCT-07 06.16.44.160000 PM";
$date =~ s/\./:/ for 1..2;
my $epoch = str2time($date);
print "Epoch: $epoch\n";
__END__
The Date::Parse module looks great, but I can't seem to find it in
my ActiveState distribution of Perl, nor am I successful in installing
it with the command "ppm install Date-Parse".
Is there any one out there who is running ActiveState Perl and has
it, or am I the only one who's missing the Date::Parse module? In
case anyone wonders, my "perl -v" output is:
This is perl, v5.8.8 built for MSWin32-x86-multi-thread
(with 33 registered patches, see perl -V for more detail)
Copyright 1987-2006, Larry Wall
Binary build 819 [267479] provided by ActiveState http://www.ActiveState.com
Built Aug 29 2006 12:42:41
Thanks.
.
- Follow-Ups:
- Re: How to convert timestamp to epoch?
- From: jl_post@xxxxxxxxxxx
- Re: How to convert timestamp to epoch?
- References:
- How to convert timestamp to epoch?
- From: void.no.spam.com@xxxxxxxxx
- Re: How to convert timestamp to epoch?
- From: Paul Lalli
- How to convert timestamp to epoch?
- Prev by Date: Re: Printing to a Windows printer.
- Next by Date: FAQ 8.10 How do I read and write the serial port?
- Previous by thread: Re: How to convert timestamp to epoch?
- Next by thread: Re: How to convert timestamp to epoch?
- Index(es):
Relevant Pages
|