Pergunta

Some systems use negative Unix time values to represent dates before the epoch (1/1/1970). MySQL does not support this. Does anyone know if SQLite does?

Foi útil?

Solução

Yes, within limits.

For SQLite versions before 3.16.0 (2017-01-02), the "unixepoch" modifier only works for dates between 0000-01-01 00:00:00 and 5352-11-01 10:52:47 (unix times of -62167219200 through 106751991167).

http://www.sqlite.org/lang_datefunc.html

Outras dicas

Yes.

sqlite> select date('1308118481', 'unixepoch'); 2011-06-15

sqlite> select date('-1308118481', 'unixepoch'); 1928-07-19

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top