Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Optimal Date conversion? (Too much information)

by steves (Curate)
on Dec 29, 2004 at 16:22 UTC ( #418013=note: print w/ replies, xml ) Need Help??


in reply to Optimal Date conversion? (Too much information)

Using Date::Manip:

use strict; use Date::Manip; my $from = 'Wed Dec 29 08:17:04'; my $to = UnixDate($from, "%y-%m-%d_%H:%M:%S"); print "$to\n";

That may not be the fastest method, since Date::Manip is pure Perl and is a bit slow. But it's pretty clear and allows both the input and output format to change as needed.


Comment on Re: Optimal Date conversion? (Too much information)
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2015-07-02 00:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (25 votes), past polls