-->
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.  [ 2 posts ] 
Author Message
 Post subject: Nhibernate date format issue due to the regional settings
PostPosted: Wed Jan 19, 2011 11:42 am 
Newbie

Joined: Thu May 13, 2010 2:44 am
Posts: 2
Im using localization in my application. When im running my application in local machine (which is having US("en-US") regional settings) application working fine without any issues.

If im running the same application in the server(which is having Spain("es-MX") regional settings) application throw the "out of range datetime" issue.

Please anyone give me idea to fix this issue.

If we are using normal sql we can use "set dateformat dmy;". But i dont know how to set this in nhibernate. Please help me to comeout of this error.

_________________
Thanks,
Ganesh.T


Top
 Profile  
 
 Post subject: Re: Nhibernate date format issue due to the regional settings
PostPosted: Fri Jan 21, 2011 5:16 am 
Newbie

Joined: Thu May 13, 2010 2:44 am
Posts: 2
Finally its resolved by setting the type="DateTime" in the mapping file itself. If we are specifying the type for the date fields then the hibernate itself take care of the datetime format. Great Nhinernate :)

_________________
Thanks,
Ganesh.T


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.