Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Changing format of a date.

by fletcher_the_dog (Friar)
on Aug 04, 2003 at 15:50 UTC ( [id://280719]=note: print w/replies, xml ) Need Help??


in reply to Changing format of a date.

You could use a simple substitution like this:
s/^\d\d(\d\d)-(\d\d)-(\d\d)$/$2$3$1/ or die "Improperly formatted date + $_\n";
But I have to agree with halley that it is better to keep it in the YEAR-MONTH-DAY format for sorting and ambiguity reasons.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-26 07:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found