conn = sqlite3.connect(':memory:', detect_types=sqlite3.PARSE_DECLTYPES)
cur = conn.cursor()
cur.execute('CREATE TABLE foo(bar DATE)')
cur.execute('INSERT INTO foo(bar) VALUES (?)', ('25/06/2003',))
try:
    cur.execute('SELECT * FROM foo')
except ValueError as err:
    print(err)
conn.rollback()
SQLite date storage and conversion