select * from Trx
where
RequestTimestamp BETWEEN DATE(NOW()) AND DATEADD(HOUR, -1, GETDATE())
I have this sql code from sybase ASA11, hoping to show data in last 1 hour, but it just shows today's record from 00:00:00.000 AM till now(). What is wrong with my script, so it can show all of record from 1 last hour to now(). Can somebody help me?
It looks like you want:
If you have
requestTimestampin the future, then an upper bound is also needed: