java - How to query data base on Date, but your DB store date as date + time. -


since want store date , time each data in table x, use

@temporal(temporaltype.timestamp) private date dateprocess;    //java.util.date 

and work great. want create query return data in same date. try

select c x c c.dateprocess = : dateprocess 

then pass in java.util.date parameter dateprocess, returned result list empty. guess must time comes place here. if 2 dates not have exact date , time, not equal, explain why returned result list empty. how return list of data base on date (dont care time) in scenario?

just use date range, specify start , end time. > starttime , < endtime


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -