My database has a column that's DATE
.
When generated the entity, it created a Timestamp
field in the entity class.
@Column(name="MY_DATE")
private Timestamp myDate;
My incoming object is a java.util.Date
object. startDate
and endDate
.
I need to write a JPA query that will fetch the records that has my_date
between startDate
and endDate
. It is taking time into consideration.
Query condition
o.myDate >=:inputDate AND o.myDate <=:inputDate