Since I want to store date and time for each data in table X
, I use
@Temporal(TemporalType.TIMESTAMP)
private Date dateProcess; //java.util.Date
and this work great. But now I want to create query that return all data in the same date. So I try
SELECT c from X c where c.dateProcess = : dateProcess
then I would pass in a java.util.Date
for parameter dateProcess
, but the returned result List is empty. I guess it must be that time
comes into place here. So if the two dates does not have the exact date and time, it would not be equal, that would explain why my returned result list is empty. So how do I return a List of data base on a Date (dont care about time) in this scenario?