>SELECT CAST((SELECT (julianday('now', 'localtime') - >julianday('1970-01-01'))*24*60*60*1000) AS INTEGER);
Are you sure you want to be mixing up timezones? julianday('1970-01-01') returns the julianday timestamp for 1970-01-01 00:00:00 GMT julianday('now', 'localtime') returns the julianday timestamp for 'now' in your current timezone. The stored result will be the offset in milliseconds from the "wall clock time" at Greenwich England, to the "wall clock time" at your current location (excluding travel time by car/train/steamer/airplane). It will have folds based on the timezone (that is, it will not be monotonic). --- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-----Original Message----- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of dmp >Sent: Monday, 2 July, 2018 11:07 >To: sqlite-users@mailinglists.sqlite.org >Subject: Re: [sqlite] Time Precision > >> Igor wrote: >> select (julianday('now') - julianday('1970-01-01'))*24*60*60*1000 > >> Keith wrote: >> select (julianday() - 2440587.5) * 86400.0 > >Both of these got me on my way, Igor's a little more clearer. I'll >doing a little more checking to insure the solution below is correct, >but seems good. Thanks. > >danap. > >Solution: > >SELECT CAST( >(SELECT (julianday('now', 'localtime') - >julianday('1970-01-01'))*24*60*60*1000) >AS INTEGER); > >_______________________________________________ >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