On Thu, Dec 22, 2011 at 5:25 PM, Simon Slavin <[email protected]> wrote:

>
> On 22 Dec 2011, at 9:44pm, Jean-Christophe Deschamps wrote:
>
> > IMHO if dates are to be stored in string format, then one should always
> store them in YYYY/MM/DD (with leading zeroes) then eventually display
> dates in whatever format suits users at the application level.
>
> To save you time in the long run, store dates as YYYYMMDD and
> date/timestamps as YYYYMMDDTHHMMSS (where 'T' is the actual letter 'T').
>  It takes very little storage.  It allows a human to read and understand
> the dates without processing them, which is extremely useful when
> debugging.  It allows comparisons (= < >) of dates, timestamps and both,
> though you can't subtract one date/time from another to give an interval.
>
> I found this format in ISO but I forget which one.
>

http://en.wikipedia.org/wiki/ISO_8601


>
> If, on the other hand, you're actually going to do lots of maths on dates
> or times, just store them as integers.
>
> Simon.
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
[email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to