Skip to Content
0
Sep 06, 2018 at 09:43 AM

get order with created time greater than 2 hours

137 Views

Hi Experts,

My requirement is to fetch all orders ,whose created time is greater than 2 hours. I am writing flexible query like :

SELECT {o.pk} FROM {Order as o} WHERE TIMESTAMPDIFF(hour,'currentsystime',{o.creationtime}) > 2 ;

But this is not working somehow.

Can anyone help on this.

Thanks in advance Sid