Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Want to format date and time

by space_monk (Chaplain)
on Nov 17, 2012 at 22:50 UTC ( #1004356=note: print w/replies, xml ) Need Help??


in reply to Want to format date and time

Well the current local time is returned by localtime

Formatting that time can be done in many different ways in Perl. The quickest way is probably to use the Posix strftime function.

Putting the two together gives:

use POSIX; print strftime( "%d/%y/%Y", localtime());
A Monk aims to give answers to those who have none, and to learn from those who know more.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1004356]
help
Chatterbox?
Discipulus the pope is the last good politic here around..sigh
[Discipulus]: erix the right order of books is: The Three Musketeers, Twenty Years After, The Count of Moret; The Red Sphinx (not in the cycle but a must read!), The Vicomte de Bragelonne

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (10)
As of 2017-05-24 07:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?