From a JS point of view new Date( ISOString )and .toISOString() are quick and available.... ISO format parsing is NOT that hard.... it's just a minor varient of parsing floats. (maybe the conversion from parts into numeric?) Haven't bothered to benchmark it. Date Diffs easily avaialble.
On Wed, Feb 6, 2019 at 1:59 PM Jens Alfke <j...@mooseyard.com> wrote: > > > > On Feb 6, 2019, at 11:55 AM, Ben Asher <benashe...@gmail.com> wrote: > > > > Hi there! We're having a debate at my company about date storage in > SQLite. > > SQLite has builtin support for ISO8601 in its date functions, so some > folks > > have started storing dates as ISO8601 SQLite-compatible date strings. Are > > there pitfalls to storing dates this way compared to a unix timestamp? > > Date-string parsing can be surprisingly expensive. I’ve seen it as a > hot-spot when profiling a program of mine that analyzed some XML-based data > sets, and I’ve also seen it slow down CouchDB map functions. > > Date strings are many times larger than the equivalent numeric timestamps. > > On the plus side, they’re much more readable if someone has to look at the > raw data in the database. > > —Jens > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users