So store your time as a 64-bit integer. Sqlite has support for that. On 28 feb 2009, at 21.47, jonwood <nab...@softcircuits.com> wrote:
> >> Database is for manipulating data. Your UI application is for >> presenting >> it nicely to the user. After all, you don't complain that SQLite, >> say, >> doesn't have functions for formatting numbers in user-friendly manner >> (e.g. 123,456.78). > > So why does it have to be pre-formatted by storing it as text that I > must > parse and then reformat? If it just stored a date object in binary > format--as a database should do--then I could easily format it to > present to > the user. > >> You can store dates as doubles representing Julian dates, or as >> integers >> representing number of seconds since Unix epoch (aka time_t). Is this >> the kind of bindary format you are talking about? > > Well, I don't know many CRT routines for working with Julian dates. > time_t > has support but they've kind of moved to a 64-bit version. I guess I > could > store it as a BLOB or store the year, month, day, hour, minute, and > second > in separate fields as well. But that doesn't seem like a very good > approach > to me. > > -- > View this message in context: > http://www.nabble.com/DateTime-Objects-tp22264879p22266629.html > Sent from the SQLite mailing list archive at Nabble.com. > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users