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

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

by Happy-the-monk (Abbot)
on Oct 13, 2013 at 18:07 UTC ( #1058094=note: print w/replies, xml ) Need Help??


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

How can i get date in this format

YYYY-MM-DD HH-MM-SS

perl -E'use Time::Piece::ISO; ($t=localtime) =~s/T/ /; $t =~s/:/-/g; say $t'

Cheers, Sören

Créateur des bugs mobiles - let loose once, run everywhere.
(hooked on the Perl Programming language)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1058094]
help
Chatterbox?
[Discipulus]: why perl -e 'print q(\'a string\'),"\n"' gives -bash: syntax error near unexpected token `)' ??

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2017-11-24 10:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (346 votes). Check out past polls.

    Notices?