[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: date format
Alan Barrett wrote:
> > The ISO date format "yyyy-mm-dd hh:mm:ss" is valid for another 9000
> > years.
> Yes, please use that format. And if you permit 5, 6, 7... digit
> years, then it has no built in obsolescence at all.
Unfortunately you have to stick to four digit years, with leading zeros,
for ASCII sort to work. Here's an example that's sorted ASCII:
As to the discussion about seconds - if we express the date as a
byte-string, it can be of arbitrary length. With ASCII sort, this works as
expected when you add decimals to the second:
Incidentally, this happens to be the ISO format. (correct me if I'm
wrong.) There are some slight parsing drawbacks, so I think we should
consider this format only if someone sees a clear need for resolution less
than 1 s. I don't think there would be any side-effects, like rounding
problems, as the shorter date in the comparison effectively determines the
number of decimal digits used.
Personally, I'm completely satisifed with a 1 s resolution.
[examples sorted using MS Excel]
Camillo Sdrs <Camillo.Sars@DataFellows.com> Data Fellows Ltd.
http://www.Europe.DataFellows.com/ Aim for the impossible and you
http://www.iki.fi/ged will achieve the improbable