On Thu, Jan 8, 2015 at 7:28 PM, Petite Abeille <petite.abei...@gmail.com> wrote:
> > On Jan 8, 2015, at 7:21 PM, Lance Shipman <lship...@esri.com> wrote: > > > > Can SQLite support millisecond precision in date time data? I looking at > doc I think so, but it's not clear. > > There is no 'date time’ data type in SQLite. Feel free to store your time > data as either text or number. To whatever precision suits you. > > There are a couple of built-in utility functions to convert things back > and forth: > > http://www.sqlite.org/lang_datefunc.html Note that Julian Times provide _almost_ ms-precision, depending on the time range you want to cover. The Fossil SCM (based on sqlite) uses Julian Times almost exclusively. HOWEVER, there is some small amount of conversion precision when doing round-trip Julian/ISO8601 times, so i'd avoid them if 100% round-trip fidelity is required. In my experiments, i see round-trip conversion errors of +/-1ms in somewhere between 0.25% (64-bit systems) to 2% (32-bit systems) of all timestamp converted round-trip between Julian and ISO8601. -- ----- stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users