Fix date handling on SQLITE3