sqlite没有特定的datetime类型。您可以使用TEXT,REAL或INTEGER类型,任何适合您的需要。
原文链接:https://www.f2er.com/sqlite/198304.html直接从DOCS
sqlite does not have a storage class set aside for storing dates and/or times. Instead,the built-in Date And Time Functions of sqlite are capable of storing dates and times as TEXT,REAL,or INTEGER values:
- TEXT as ISO8601 strings (“YYYY-MM-DD HH:MM:SS.SSS”).
- REAL as Julian day numbers,the number of days since noon in Greenwich on November 24,4714 B.C. according to the proleptic Gregorian calendar.
- INTEGER as Unix Time,the number of seconds since 1970-01-01 00:00:00 UTC.
Applications can chose to store dates and times in any of these formats and freely convert between formats using the built-in date and time functions.
sqlite内置的日期和时间功能可以是found here。