I’m using sqlalchemy and to_sql to insert my dateframe into my Oracle table. Everything works, but I added a DATE column to the end of the table, and cannot get sqlalchemy to insert that value.
Here is the short code snippet:
x = datetime.datetime.now()
y = x.strftime("%Y-%m-%d %H:%M:%S")
df('date_appended') = y
df_ora.to_sql('table_name', con, if_exists='append', index=False, dtype={'date_appended': sqlalchemy.DateTime()})
cx_Oracle.DatabaseError) ORA-01861: literal does not match format string
'date_appended': '2020-12-01 08:18:36'
Any suggestions?