The statement: SELECT strftime('%Y-%m-%d %H:%M:%f', '2016-04-31 17:19:59.670') gives: 2016-04-31 17:19:59.670
Should that not be NULL? It does with: SELECT strftime('%Y-%m-%d %H:%M:%f', '2016-04-32 17:19:59.670') It looks like a value of 31 is always allowed for day: SELECT strftime('%Y-%m-%d %H:%M:%f', '2016-02-31 17:19:59.670') gives: 2016-02-31 17:19:59.670 -- Cecil Westerhof