sqlite:如何从1970年1月1日起将当前_时间戳选择为毫秒值
如何将当前日期/时间选择为自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'),但不包括小数部分): 更容易理解。它有效但不准确。为时已晚,
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;