> > > But do you really do things like run a search on "invoices made on a Monday > in February" ?
Yes. For example, in a store, it is useful to have sales statistics by day of the week, or by time slot, etc.. > Most of the time I store a date I'm storing it for three purposes: > > A) to print it back out again > B) to sort by date > C) to search for rows within a particular date range > > You almost never need to do things like subtract one date from another. > Given the above, most of my systems store dates as strings in this format > "YYYYMMDD". This gives me superfast (B) and (C ). If I want to print the > date out it doesn't matter if I process slowly because the printer is even > slower, so I convert from that format. > > In those rare cases where I am going to want to do maths on a date (e.g. > subtract one date from another) I store dates in a numeric format (julianday > or unixepoch) and when I do this I often store a text version of the date > too, because it makes debugging so much easier. ok, thank you Simon. olivier _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users