本文介紹了SQLite 文件中的 9 位時間戳的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
限時送ChatGPT賬號..
我正在處理來自客戶端的 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 位時間戳的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!