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

Answer: How do I find today's date?

by Zombie Melkurion (Initiate)
on Sep 03, 2001 at 15:20 UTC ( #109844=categorized answer: print w/replies, xml ) Need Help??

Q&A > dates and times > How do I find today's date? - Answer contributed by Zombie Melkurion

Here's a complete little program:
use Time::localtime; $tm = localtime; printf("The current date is %04d-%02d-%02d\n", $tm->year+1900, ($tm->mon)+1, $tm->mday); printf("The current time is %02d:%02d:%02d\n", $tm->hour, $tm->min, $t +m->sec);

Replies are listed 'Best First'.
Re: Answer: How do I find today's date?
by davorg (Chancellor) on Sep 03, 2001 at 15:33 UTC
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
[ovedpo15]: how fast and a good way to print error if more than one out of three variables are defined? for example if there are $a $b $c. I want that if for example $a and $b are defined - print error (also for $a and $c or $b and $c)

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2018-04-22 13:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?