Hi,
I am new to Hibernate. I have a quick question regarding the usage of timestampdiff in HQL. I am using mySQL as the database and the following executes fine on MySQL.
select timestampdiff(second,starttime, endtime) from requests where id = 234;
I couldn't get the equivalent HQL query. Does HQL provide equivalent function? I tried searching for it, but in vain.
Here is the HQL query I used, but it failed.
select timestampdiff(second, req.starttime, req.endtime ) as difftime from Request req where req.id = 234;
If anybody used it or know about it, please let me know.
Thanks, Kumar
|