欢迎投稿

今日深度:

【数据库】Sqlite获取long类型的当前时间,sqlitelong

【数据库】Sqlite获取long类型的当前时间,sqlitelong


select strftime('%s','now','localtime')*1000
+(strftime('%f','now','localtime')
-strftime('%S','now','localtime'))*1000;

参考资料:

%d 月份, 01-31
%f 小数形式的秒,SS.SSS
%H 小时, 00-23
%j 算出某一天是该年的第几天,001-366
%m 月份,00-12
%M 分钟, 00-59
%s 从1970年1月1日到现在的秒数
%S 秒, 00-59
%w 星期, 0-6 (0是星期天)
%W 算出某一天属于该年的第几周, 01-53
%Y 年, YYYY
%% 百分号

www.htsjk.Com true http://www.htsjk.com/SQLite/31073.html NewsArticle 【数据库】Sqlite获取long类型的当前时间,sqlitelong select strftime( '%s' , 'now' , 'localtime' ) *1000 +(strftime( '%f' , 'now' , 'localtime' )-strftime( '%S' , 'now' , 'localtime' )) *1000 ; 参考资料: %d 月份, 01-31...
相关文章
    暂无相关文章
评论暂时关闭