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

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

by RichardK (Vicar)
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 examining the Monastery: (6)
As of 2015-07-06 03:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (70 votes), past polls