Hi,
in my code I'm passing 3rd of the parameters has timestamp value, type str!
-------------------------------------------------------------------------------------------------------------
sql_insert = """
INSERT INTO TABLE
(COL1,
COL2 ,
COL3 ,
COL4 )
VALUES (?, ?, ?, ?)
"""
params = value1,
value2 ,
value3 , value4
cursor_insert = self.__conn.cursor()
cursor_insert.execute(operation=sql_insert, parameters=
params)
-------------------------------------------------------------------------------------------------------------
After runing the program I get this error:
[DataError("Exception('Statement Execute Failed: [IBM][CLI Driver][DB2/AIX64] SQL0180N The syntax of the string representation of a datetime value is incorrect. SQLSTATE=22007\\r SQLCODE=-180')")]
In DB2 database that 3rd column is defined as TIMESTAMP but there isnt timestamp type in Python?
Can somebody help?