Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: Date format YYYY-MM-DD HH-MM-SS

by moritz (Cardinal)
on Oct 13, 2013 at 10:32 UTC ( #1058054=note: print w/replies, xml ) Need Help??

in reply to Date format YYYY-MM-DD HH-MM-SS

... by formating it that way. For example with POSIX::strftime.

Many time-related modules (like DateTime, Date::Calc etc.) also have convenience methods for formatting dates and times.

Replies are listed 'Best First'.
Re^2: Date format YYYY-MM-DD HH-MM-SS
by builat (Monk) on Oct 13, 2013 at 12:08 UTC
    For *nix like systems the lame but the fast way is my $date = `date +"%Y-%m-%d-%H-%M-%S"`;

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1058054]
[Discipulus]: the very same topic was discussed in CB yesterday at lunch time
[Discipulus]: or can I ask for a module to do the back conversion from flame to txt?

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2017-06-23 08:04 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (538 votes). Check out past polls.