userimage

ORA-01847: day of month must be between 1 and last day of month

In my query , i have the conditions like this.

SELECT * FROM SAMPLE_TABLE WHERE

(TO_DATE(EFFECTIVE_START_DATE)=TO_DATE(LAST_PROCESSED_DATE)
OR TO_DATE(EFFECTIVE_EXPIRE_DATE) =TO_DATE(LAST_PROCESSED_DATE));

I am getting this exception, Please help me out any one.



userimage

The question itself suggesting the answer for you. Please re evaluate the data on your table and focus the below observations,


Cause: The day of the month listed in a date is invalid for the specified month. The day of the month (DD) must be between 1 and the number of days in that month.


Action: Enter a valid day value for the specified month.


Answer is