mercredi 20 mai 2015

Error - "SQLite DateTime type only accepts Python " "datetime and date objects as input."

I tried to declared a variable contains of Datetime like this

ts1.departure_date = '2012-03-03 10:10:10'

but then I got this error

StatementError: (exceptions.TypeError) SQLite DateTime type only accepts Python datetime and date objects as input. 

I wonder what is the correct way to declare a variable with datetime format? Thanks in advance

Aucun commentaire:

Enregistrer un commentaire