Unix timestamp or IS0-8601 date string in SQLite
问题 SQLite doesn't support DATE/DATETIME data type. Therefore datetime can be presented in database as unix timestamp e.g. integer, number of seconds since Jan 01 1970 or as IS0-8601 string YYYY-MM-DD HH:MM:SS When datetime is stored as unix timestamp we can perform queries like this: select * from table where c1 < datetime(1452598502, 'unixepoch', 'localtime') Also if date is stored as string in the form: 2016-01-10 15:44:42 queries like upper are still correctly executed (lexicographical