Re: How to convert timestamp to epoch?



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.

.



Relevant Pages

  • Re: Activestate Perl mit XP SP2 testen
    ... ob Activestate Perl mit SP2 in wesentlichen Teilen ... >> dem Modul beiliegenden Testskripten erledigen. ... Die vorkompilierten Binaries von ActivePerl ...
    (de.comp.lang.perl.misc)
  • ORA-12154 (DBD ERROR: OCIServerAttach)
    ... This is perl, v5.8.7 built for MSWin32-x86-multi-thread ... Binary build 813 provided by ActiveState http://www.ActiveState.com ... DBI version 1.48 ... ppm install -force -follow ...
    (perl.dbi.users)
  • Re: Win32::TieRegistry problem
    ... Turns out there was another Clearcase command I ... other posts) is getting the political buy off to use ActiveState Perl. ... The other problem is that I am no big fan of ActiveState. ... I was writing a Clearquest Daemon process. ...
    (comp.lang.perl.modules)
  • Re: how to print " time " ???
    ... recommended only if you are unable to install ActivePerl using the MSI ... unless you don't want to use the newer standard installation package ... > I wonder why perldoc works on my installation of Activestate perl when it ... > Binary build 813 provided by ActiveState ...
    (perl.beginners)
  • Re: Important Research Project
    ... there are any experienced computer programmers who would like to provide ... some assistance with an effort to develop a Perl language computer program. ... get it running on a Windows XP or Vista system. ... and is supported both by ActiveState and quite a few independent ...
    (comp.lang.ruby)