Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do we insert dates using executemany in Python+cx_Oracle ?

288ba680-a18f-43a1-a266-706542318532Nov 30 2017 — edited Dec 5 2017

Hello,

I am using Oracle 11g and Python 2.7 to insert data into my tables.

I have a list of dictionaries - example [ {"Date": "12/12/2012" , "CheckStatement" : "Yes"} , {"Date": "13/12/2012" , "CheckStatement" : "Yes"}]

I make a list of lists out it- example [["11/11/2017 5:06", "Yes"], ["11/11/2017 5:06", "Yes"]]

My DB table looks like -

Date (TIMESTAMP(6))
CheckStatement (String)
11/11/2017 5:06Yes
11/11/2017 5:06No
11/11/2017 5:06Yes

How do I execute the executemany() function so that my dates are filled with it?

Currently i get this error - ORA-01843: not a valid month

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 2 2018
Added on Nov 30 2017
1 comment
3,857 views