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

Re: Date to be sorted in descending and time in ascending

by RichardK (Priest)
on May 18, 2012 at 09:38 UTC ( #971254=note: print w/ replies, xml ) Need Help??


in reply to Date to be sorted in descending and time in ascending

Split out the bits of the datetime your interested in using substr.

my $dt = '20090405022100'; my $d = substr $dt,0,8; my $t = substr $dt,8;

Then read the perlfaq on sort How do I sort an array by (anything)?


Comment on Re: Date to be sorted in descending and time in ascending
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2014-08-22 01:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (145 votes), past polls