Runtime error occurred: 1843 (ORA-01843: invalid month)

1) When we use the following SQL statement
INSERT INTO “temptable” (DELIVER_DATE) VALUES (TO_DATE(’27-Jun-2007 15:57:30′,’DD-MON-YYYY HH24:MI: SS’))
Runtime error occurred: 1843 (ORA-01843: invalid month) The 
database will report an ORA-01843 error. This is because the client is in a Chinese environment, and the format mon cannot be written in English. It must be written in Chinese
If you don’t want to modify the sql statement to run in June , you need to use the alter session command to modify nls_date_language to american before executing the statement, as follows:
alter session set nls_date_language=’american’ –display the date in English
Today An error of ORA-01843 has occurred. This error represents an invalid month, which is usually prompted when the date is converted. 
alter session set NLS_DATE_FORMAT=’DD-MON-YY’; 

Read More:

Leave a Reply

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