I have a defined column notification_date as DATETIME in Database.
When the user filter I get only Date. So I'm converting as data and time using Java. For an Example if the userSearch Date is '2012-09-26'. The final converted date and time format will be '2012-09-26 17:34:00'
When I want to search Date filter operations like equal,Less than , Greater than and date between, I'm not able to get the proper result using Hibernate criteria Query for Greater than and Less than operation.
The code used
crit.add(Restrictions.gt("notificationDate",notificationVO.getNotificationDate()));
The restriction will change according to the condition
To compare only date, is there any functions available in Hibernate?
Any other idea to fix this issue?