ORA-01843 not a valid month

164
Views
1
Answers

When I am inserting a datetime in Oracle table I get this Oracle error

 ORA-01843: not a valid month 

I am using US Datetime format. How do I fix this error?

edit | flag
William Patrick
Asked on: Dec 07, 2011 at 2:06AM

1 Answers

82
4
82

The cause of this error could be any of the following reasons

    1.Using wrong DD/MM sequence / incorrect NLS_DATE_FORMAT
     
This happens a lot when you see data coming from US
     
(where the Month is normally written before the day)
      but the format
in the application is still the "european" style.
     
(where the day is written before the month)
     
or inverse of course

   
2.Using a different Language with the MON mask,
      which can be much harder to spot
.

   
3.Using a complete incorrect NLS_DATE_FORMAT:
     
Such as trying to insert a "written" month name but are using a "numeric"

To get your Database's NLS_DATE format use this query

SELECT * from NLS_INSTANCE_PARAMETERS;

SELECT
* from NLS_DATABASE_PARAMETERS;

select * from nls_session_parameters;
edit | flag
Gokul A
Answered on: Dec 07, 2011 at 2:11AM

Post your Answer

Search

Welcome to Ask Amoeba!
This is 100% free and interactive site for sharing professional Questions and Answers, Opensource projects, Interview questions.
Learners, beginners, Experts stop and share your knowledge and ideas!

Browse Categories

Browse Tags