sqlite - Difference in seconds between timestamps in Sqlite3 -


is possible difference (in seconds) between 2 timestamp values in sqlite3?

for instance, i've tried following query:

select current_timestamp - my_timestamp my_table; 

and '0'. can tell me i'm doing wrong? (note, have verified my_timestamp indeed in past.)

got it:

select (julianday(current_timestamp) - julianday(my_timestamp)) * 86400.0) my_table; 

julianday returns fractional number of days since noon in greenwich on november 24, 4714 b.c. take difference , multiply number of seconds per day.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -