• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Comapring dates in hibernate

 
Shivali Sethi
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to compare dates in hibernate criteria API. In case If I have same StartDate and EndDate, how can i compare dates using "between" keyword. can i use trunc keyword in hibernate?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I want to compare dates in hibernate criteria API. In case If I have same StartDate and EndDate, how can i compare dates using "between" keyword

You can do this using the between Criterion. Read the JavaDocs for the Restrictions class.


can i use trunc keyword in hibernate?

Yes.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic