The traditional method of sorting items by date is to use mm/dd/yy
, as in:
Well, in any list where things get sorted by name, the above items would be sorted as:
Pretty messed-up, eh?
So the solution is to assign dates in the format of yyyymmdd
:
Now the list (sorted by name) will retain the order you originally intended!
(This method of assigning dates is also employed by the U.S. military...)
This works for anything that sorts. (Pre-Y2K programs may not accept alternate dating formats. Alternately, "safe" programs might have a way of converting standard dates to a more stable format...) And it works for ANY year/century/millennium because the year comes first and is always in its full version.
© David Pierre Ostwald, 1999--all rights reserved.