Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
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.


Comment on Re: Want to format date and time
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (12)
As of 2014-04-17 19:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (454 votes), past polls