Date-time format conversion of Python connecting to Oracle database through cx_Oracle?

1. Process: Python looks up the data in the table through cx_Oracle and inserts the data into another table.

2. The type of date and time stored in both tables is of type Date.

3. The time field I took from the query table prints out that the type is datetime.datetime.

4. Now inserting the queried time field directly into another table will report a format error: "the date format picture ends before converting the entire input string". Direct insertion of datetime.datetime type should not be supported.

5. I can test with the .date () method. Just take the date and you can insert it. But the time field in the database must be accurate to minutes and seconds. I hope there are bosses who can give us some advice, and you can insert the date and time completely.

6.ps: most of the search methods from the Internet use the to date () method, but my insert sentence is concatenated, as shown in the following figure. What should I do with this

Mar.06,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e3dc78-4476c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e3dc78-4476c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?