Skip to Main Content

Oracle Database Discussions

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How do I fix it ORA-01843: not a valid month error ?

Saumyadip Sarkar-OracleNov 17 2020 — edited Nov 17 2020

Hi All,
I would like your help in fixing ORA-01843: not a valid month.
When I use the below code
select count(*) from
TABLE
where (round(SYSDATE - to_date(LAST_UPDATE_DATE,'DD-MM-YYYY:hh24:mi:ss'),2)) > 2.1;
I am getting error ORA-01843: not a valid month
whereas when I use
select (round(SYSDATE - to_date(LAST_UPDATE_DATE,'DD-MM-YYYY:hh24:mi:ss'),2)) from
TABLE
where (round(SYSDATE - to_date(LAST_UPDATE_DATE,'DD-MM-YYYY:hh24:mi:ss'),2)) > 2.1
I am able to get records like
112.13
90.07
70.24
70.03
70.02
Why am I getting ORA-01843: not a valid month ? How do I fix it?
Any help on this would be of immense help.
Regards,
Saumyadip.

This post has been answered by EdStevens-OC on Nov 18 2020
Jump to Answer
Comments
Post Details
Added on Nov 17 2020
18 comments
33,908 views