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.  [ 1 post ] 
Author Message
 Post subject: in Between on Date field
PostPosted: Wed Sep 14, 2005 8:19 am 
Hibernate 3.0
Oracle 9i


Hi,
I have a field in database of type Date. The same has been mapped as java.util.Date .
> There are dates in my database with no time stamp( e.g '02-Sep-2005').
criteria.add(Expression.between("dueDate",calendar.getTime(),calendar2.getTime()));
translated to : (between Fri Sep 02 00:00:00 GMT+05:30 2005 and Sat Sep 03 00:00:00 GMT+05:30 2005)
When I query the database for the date ('02-Sep-2005') , the row is not returned. If we change the value in the database to a one with time stamp , the above works fine.
The same does not happen if we use a SQL. Can you suggest what is the best way to get the data as the data can contain time stamp or may not contain time stamp .
Thanks
Ritesh


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

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.