I discovered julianday() function and because it is linked to the distant past, I tried to find some old dates and I found a bug in date() function for date in range -1000-0000 (1000BC-0BC):
sqlite> select date('-1000-01-01'); -- OK -1000-01-01 sqlite> select date('-0999-01-01'); -- BUG, should return date '-0999-01-01' -999-01-01 sqlite> select date('-999-01-01'); -- cannot be converted to '-0999-01-01' sqlite> select date('-0001-01-01'); -- BUG, should report date '-0001-01-01' -001-01-01 sqlite> select date('-001-01-01'); sqlite> .version SQLite 3.22.0 2018-01-22 18:45:57 0c55d179733b46d8d0ba4d88e01a25e10677046ee3da1d5b1581e86726f2alt1 zlib version 1.2.11 gcc-7.4.0 With regards, --------------------------------- Petr Slansky, slan...@usa.net _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users