Print Thread
ORA-01843 not a valid month
#33212 01/27/09 03:07 PM
Joined: Jan 2009
Posts: 1
M
Member
OP Offline
Member
M
Joined: Jan 2009
Posts: 1
Greetings and Salutations!

I am a desktop support tech at an insurance company. We have about 20 developers that use PL-SQL on Windows XP Pro.

One of my users gets the error "ORA-01843: not a valid month" when he enters a date with the format MM/DD/YYYY. A previous temporary workaround was to have him use another format, but management says the queries must be standardized for coding purposes.

I checked in the registry for the NLS_DATE_FORMAT entry, and it is MM/DD/YYYY HH:24:MI:SS as it should be. (Actually, I found it in more than one place, but it was correct in each.) I have also confirmed that Regional and Language Options were set correctly. The settings in PL-SQL seem to be correct and match the other users, too.

Where else can I check for settings to correct this issue in PL-SQL?

It works fine for the other 19 users. Also, I had the user try his profile on a neighboring system and the issue did not follow him. I logged in to his system, and the error occurred with my profile as well. This issue seems to be machine specific.

Any help would be appreciated. I _really_ do not wish to re-image the system or set this user up on another system if I can avoid it.

~MDWyatt

Re: ORA-01843 not a valid month
Michael Wyatt #33217 01/28/09 07:22 AM
Joined: Jan 2003
Posts: 97
Denmark
B
Member
Offline
Member
B
Joined: Jan 2003
Posts: 97
Denmark
Try looking in Tools -> Preferences -> User Interface -> Date/time. There you can specify a user defined date format or whether to use the Windows format or Oracle format. That could be the difference.

Regards
Bo Pedersen

Re: ORA-01843 not a valid month
Bo Pedersen #33221 01/28/09 10:53 AM
Joined: Aug 1999
Posts: 22,224
Member
Offline
Member
Joined: Aug 1999
Posts: 22,224
If you are using a literal date value in a SQL statement without using the to_date() function with a date format, then it must conform to the sessions NLS_DATE_FORMAT. To check the current format, run the following query:

Code
select * 
  from nls_session_parameters p
 where p.parameter = 'NLS_DATE_FORMAT';


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.026s Queries: 14 (0.008s) Memory: 2.5067 MB (Peak: 3.0430 MB) Data Comp: Off Server Time: 2024-05-25 18:56:31 UTC
Valid HTML 5 and Valid CSS