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 位时间戳


- SQL 临时表问题 2022-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
- 更改自动增量起始编号? 2021-01-01
- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01
- 在SQL中,如何为每个组选择前2行 2021-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01
- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- 导入具有可变标题的 Excel 文件 2021-01-01