Das Datum in der Oracle-Datenbank ist datetime yyyy-mm-dd hh :mm:dd, aber ich erhalte ständig Fehlermeldungen wie:
Code: Select all
-TypeError:can only concatenate str (not "Timestamp") to str
Exception in Tkinter callback
-TypeError: can only concatenate str (not "datetime.date") to
str. Exception in Tkinter callback
And the last error:
-oracledb.exceptions.DatabaseError: ORA-01861: literal does
not match format string. Exception in Tkinter callback
Fecha = self.cal1.get_date()
Fecha2=Fecha.strftime("%Y-%m-%d %H:%M:%S")
sql = " SELECT t3.DESCRIPTION as ASSET_DESCRIPTION from maximo.BTV_workorder T1 inner join maximo.BTV_PM t2 on t2.Assetnum=T1.Assetnum left join maximo.BTV_ASSET t3 on T1.ASSETNUM=t3.ASSETNUM where T1.istask='1' and T1.SITEID='ALBAL' and T1.STATUS='COMP' and t2.STATUS='ACTIVE' and t1.STATUSDATE ='" + Fecha2 + "'"