Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Changing format of a date.

by djbiv (Scribe)
on Aug 04, 2003 at 18:54 UTC ( [id://280758]=note: print w/replies, xml ) Need Help??


in reply to Changing format of a date.

here is my preference: you can modify however you like, but I agree with keeping the century as well...
my($sec,$min,$hour,$mday,$mon,$year) = localtime; my $current_time = sprintf("%02d%02d%02d%02d%02d%02d", $year-100,$mon+ +1,$mday,$hour,$min,$sec);
it's output of the time is in this format "030804135240"

Replies are listed 'Best First'.
Re: Re: Changing format of a date.
by nadadogg (Acolyte) on Jan 08, 2004 at 14:50 UTC
    I'm ultimately going with your idea there, after coming back to this problem. Thanks!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-24 00:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found