Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Date format manipulation

by projekt21 (Friar)
on Oct 17, 2001 at 12:15 UTC ( [id://119339]=note: print w/replies, xml ) Need Help??


in reply to Date format manipulation

As Date::Manip is very slow, you maybe want to try Date::Parse for parsing the date and either printf or Date::Format for a formatted output:

use Date::Parse; # get a time() compatible value my $time = str2time("...string..."); # or an array my ($ss,$mm,$hh,$day,$month,$year,$zone) = strptime("...string..."); $month++; $year += 1900;
and:
use Date::Format; my $format = "%a %b %d %l:%M %p ;%Z"; print time2str($format, time);

Hope this helps.

alex pleiner <alex@zeitform.de>
zeitform Internet Dienste

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-04-23 17:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found