Skip to content
Advertisement

Binding dates to SQL in Python for cx_Oracle

I am using the following query to select logs fro a logs table.

I have the following dictionary of parameters:

and executing the query as follows :

Now the problem is I am not getting any values for this date range. But if I execute the query in Oracle, by specifying the dates, it is working. What is wrong here ?

Advertisement

Answer

If you specified format mask as 'MM-DD-YYYY', why do you then provide only two digits for year ('02-24-20')? Provide 4 digits.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement