Timestamp with 9 digits in SQLite file(SQLite 文件中的 9 位时间戳)
问题描述
我正在处理来自客户端的 SQLite 文件,发现一列标记为 TIMESTAMP,我过去曾使用 10 位数的 php 时间戳,该文件的时间戳为左侧 9 位数,右侧 6 位数:
I am working on a SQLite file from a client and found a column marked as TIMESTAMP, I have work in the past with php timestamp with 10 digits, this file has time stamps with 9 digits to the left and 6 to the right:
570822838.260406
570822838.544408
570822846.167604
我不知道如何将这些数字转换为日期时间或如何计算它们.有什么帮助吗?谢谢.
I do not know how to convert this numbers to date-times or how are they calculated. Any help? Thanks.
推荐答案
我猜这是一个 Apple Core Data 时间戳,基于这个:
I'd guess it's an Apple Core Data timestamp, based on this:
sqlite> select datetime(570822838.260406, 'unixepoch', '+31 years');
2019-02-02 17:53:58
所以你可以使用上面的转换成标准格式.
So you can use the above to convert to a standard format.
(另外,请查看 这个答案 .)
(Also, check out this answer .)
这篇关于SQLite 文件中的 9 位时间戳的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:SQLite 文件中的 9 位时间戳
基础教程推荐
- MySQL 5.7参照时间戳生成日期列 2022-01-01
- ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和 2021-01-01
- CHECKSUM 和 CHECKSUM_AGG:算法是什么? 2021-01-01
- 从字符串 TSQL 中获取数字 2021-01-01
- while 在触发器内循环以遍历 sql 中表的所有列 2022-01-01
- MySQL根据从其他列分组的值,对两列之间的值进行求和 2022-01-01
- 使用 VBS 和注册表来确定安装了哪个版本和 32 位 2021-01-01
- 带有WHERE子句的LAG()函数 2022-01-01
- 带更新的 sqlite CTE 2022-01-01
- 如何在 CakePHP 3 中实现 INSERT ON DUPLICATE KEY UPDATE aka upsert? 2021-01-01
