sqlite> select typeof(date('now'));
text
sqlite> select typeof(current_time);
text
sqlite> select typeof(current_date);
text
How to select the current date/time as an integer value of milliseconds since Jan/1/1970?
sqlite> select typeof(date('now'));
text
sqlite> select typeof(current_time);
text
sqlite> select typeof(current_date);
text
How to select the current date/time as an integer value of milliseconds since Jan/1/1970?
SELECT unixepoch('subsec');
The "subsecond" and "subsec" modifiers have the special property that they can occur as the first argument to date/time functions (or as the first argument after the format string for strftime()). When this happens, the time value that is normally in the first argument is understood to be "now". For example, a short cut to get the current time in seconds since 1970 with millisecond precision is to say:
From SQLite doc:
Compute the time since the unix epoch in seconds (like strftime('%s','now') except includes fractional part):
SELECT (julianday('now') - 2440587.5)*86400.0;
SELECT (julianday('now') - 2440587.5)*86400.0 * 1000;
strftime() gives you only seconds: