Python Sqlite ValueError: Couldn't Parse Datetime String
I have a .txt file which I use to fill a sqlite table FoodConsumed_tb class FoodConsumed_Tb(db.Model): __tablename__ = 'foodconsumed_tb' id = db.Column(db.Integer, primary
Solution 1:
this is format error.
your date type is 'date_created = db.Column(db.DateTime)', you should insert value 'datetime('now')'
if your data type is 'db.Column(db.Date)', then the value should be 'date('now')'
datetime -> 2020-04-02 14:30:21
date -> 2020-04-02
Post a Comment for "Python Sqlite ValueError: Couldn't Parse Datetime String"