Skip to content
Advertisement

Not a Valid Month – Working with Dates in Oracle

I am finding it strenuous to work with dates in my customized environment. I have a request to add a where clause which caters to specific dates but I just cannot get oracle to budge. Any ideas anyone please.

When I try to add a where clause the snippet blows up with the error:

I have also tried to_date(created_date, 'MM/DD/YYYY') in the from but proves to be erroneous with:

Advertisement

Answer

Firstly cast as date which converts a timestamp value to a date value, and then don’t forget to add trunc() function in order to include the boundry value (date'2020-02-28' in this case) also as

Demo

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