Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Perl date conversion

by Fletch (Chancellor)
on Mar 23, 2011 at 18:22 UTC ( #895070=note: print w/ replies, xml ) Need Help??


in reply to Perl date conversion

Use strftime from POSIX (granted it only prints the day-of-week as only a single digit so it's not 100% equivalent if (e.g.) you need fixed columns)

perl -MPOSIX=strftime -lne 'print strftime("%Y %m %d %w %H\t1",localti +me($_))'

The cake is a lie.
The cake is a lie.
The cake is a lie.


Comment on Re: Perl date conversion
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2015-07-30 06:40 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 (270 votes), past polls