Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

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?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2016-10-26 01:53 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (330 votes). Check out past polls.