ORA-01843: not a valid month

I got ” ORA-01843: not a valid month ” error in Oracle database.

 

ORA-01843: not a valid month

 

Details of error are as follows.

ORA-01843 not a valid month

Cause: A date specified an invalid month. Valid months are: January-December, for format 
code MONTH, and Jan-Dec, for format code MON.

Action: Enter a valid month value in the correct format.

 

 

not a valid month

This ORA-01843 errors are related with the date specified an invalid month. Valid months are: January-December, for format code MONTH, and Jan-Dec, for format code MON.

 

TO_DATE Function

To solve this error, you should Use the “to_date” function on dates in the SQL Rule to ensure they are read successfully.

Example: to_date(’04/28/2021′, ‘MM/DD/YYYY’)

 

For example; If you run the following sql statement, you will get this error.

SELECT * FROM TEST_TABLE WHERE CREATED_DATE = '29/04/21';

 

You should use TO_DATE function as follows to solve this error.

SELECT * FROM TEST_TABLE WHERE CREATED_DATE = TO_DATE('29/04/21', 'DD/MM/YY');

 

You can read the following post to learn more details about TO_DATE Function.

PL/SQL Datetime Functions

 

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )

 

About Mehmet Salih Deveci

I am Founder of SysDBASoft IT and IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress [email protected].-                                                                                                                                                                                                                                                 -Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  [email protected] a mail atabilirsiniz.

Leave a Reply

Your email address will not be published. Required fields are marked *