I've got two Date
Java objects which will be assigned to some variables in sql query (because I use Hibernate) in order to compare them with a DateTime
type column to get rows with a specified time range, for example:
WHERE event_date >= :startDate and event_date < :finishDate
I couldn't compare date to datetime directly so I thought of 2 possible solutions:
- Try to convert event_date field using a query to date field before the comparison.
- Or try to convert date java object to dateTime which I think might not be possible..
What would you suggest me to do?