Correct date formatting for SQLite

issue #276 fixed