Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

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?

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2015-11-28 07:00 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (739 votes), past polls