how to find difference between two timestamp using hibernate query language
Posted
by Shekhar
on Stack Overflow
See other posts from Stack Overflow
or by Shekhar
Published on 2010-04-13T05:30:43Z
Indexed on
2010/04/13
5:32 UTC
Read the original article
Hit count: 401
Hello
I am trying to write an hql query which gives me the number of hours between two timestamp.
So, far i am unable to do this. I have used hql hour function but that does not work if the
timestamp corresponds to different date. Please provide any input.
My hql query is
select count(*) from com.xxx.Request as request where request.id = :id and hour(current_timestamp - request.lastEventDate) > :delay
Thanks
Shekhar
© Stack Overflow or respective owner