Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
sqlite:如何从1970年1月1日起将当前_时间戳选择为毫秒值_Sqlite_Current Time - Fatal编程技术网

sqlite:如何从1970年1月1日起将当前_时间戳选择为毫秒值

sqlite:如何从1970年1月1日起将当前_时间戳选择为毫秒值,sqlite,current-time,Sqlite,Current Time,如何将当前日期/时间选择为自1970年1月1日起的毫秒整数值?仅提供秒数: sqlite> select typeof(date('now')); text sqlite> select typeof(current_time); text sqlite> select typeof(current_date); text 发件人: 以秒为单位计算自unix纪元以来的时间(如strftime('%s','now'),但不包括小数部分): 更容易理解。它有效但不准确。为时已晚,

如何将当前日期/时间选择为自1970年1月1日起的毫秒整数值?

仅提供秒数:

sqlite> select typeof(date('now'));
text
sqlite> select typeof(current_time);
text
sqlite> select typeof(current_date);
text
发件人:

以秒为单位计算自unix纪元以来的时间(如strftime('%s','now'),但不包括小数部分):


更容易理解。它有效但不准确。为时已晚,但为什么不为新来者解释一下呢?2440587.5是1970年1月1日0:00 UTC的儒略日。86400是一天中的秒数
SELECT strftime('%s', 'now') * 1000;
SELECT (julianday('now') - 2440587.5)*86400.0; 
SELECT (julianday('now') - 2440587.5)*86400.0 * 1000;