Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: sorting dates in YYYYMMDD format

by sundialsvc4 (Abbot)
on Jul 05, 2013 at 02:06 UTC ( #1042565=note: print w/ replies, xml ) Need Help??


in reply to sorting dates in YYYYMMDD format

Don’t make this harder than it needs to be.   The reason for using a YYYYMMDD format is that it can “just be sorted as-is,” whether numerically or as a string.   Breaking it down into three groups, only to concatenate them in the same order, does nothing at all.   If you need to isolate the string from a bigger string, a simple pattern looking for 8 consecutive digits will do it.


Comment on Re: sorting dates in YYYYMMDD format

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2015-07-04 00:07 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 (57 votes), past polls