Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Date processor

by enoch (Chaplain)
on Feb 23, 2001 at 22:52 UTC ( [id://60528]=note: print w/replies, xml ) Need Help??


in reply to Date processor

If you really wantto do this via code and not a prebuilt module, here it is (assuming date format is 'mmm dd yyyy hh:mm(am|pm)' that is 'Feb 19 2001 3:42pm').
use strict; my $str = "2-19-01 3:49pm"; my %months = qw(1 Jan 2 Feb 3 Mar); my ($month,$day,$year,$time) = split /-|\s/,$str; my $dataDate = "$months{$month} $day 20$year $time\n"; print $dataDate;

Jeremy

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://60528]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-03-28 11:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found