-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: ORA-01847: day of month must be between 1 and last day of mo
PostPosted: Tue Aug 30, 2005 10:04 am 
Newbie

Joined: Tue Aug 30, 2005 9:48 am
Posts: 1
Location: chennai
Hi,

--I am trying to update the date in oracle9i through hibernate.
--The date string that i am using to update the
DB through Hibernate is 01-AUG-2005.
--This works fine with sql DB.But with oracle9i it throws the exception

ORA-01847: day of month must be between 1 and last day of month

Please help me out asap.

_________________
-Kamesh


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 30, 2005 11:05 am 
Senior
Senior

Joined: Wed Jul 13, 2005 4:31 pm
Posts: 142
Location: Seattle, WA
Just a suggestion....it might work better to ..
a. converting string to date in your own code using a SimpleDateFormatter
b. then set the value as a Date object instead of String object.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 30, 2005 5:42 pm 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
You can set nls_date_format in oracle init.ora file
For example, if you can set string like '01-AUG-2005' set
nls_date_formt to 'dd-mon-yyyy'

regards


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.