Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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 meditating upon the Monastery: (3)
As of 2014-10-26 02:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (149 votes), past polls