I have a column named [DateAdded]
I am trying to find all records posted in the last hour.
I thought putting the following WHERE clause would work
SELECT T1.[FAXID], T1.[FilePathTIF], T2.[DateAdded] FROM FaxQueueFiles as T1 INNER JOIN FaxQueue as T2 ON T1.[FaxID] = T2.[FaxID] WHERE GETDATE() - T2.[DateAdded] >= 60;
It does not produce the results I want. Can anyone help me on what I am doing wrong? Even if I change >= to <= it does not give me only the records in the last hour. Should it not be 60?
The [DateAdded] column is of format YYYY-MM-DD HH:MM:SS:MS
It seems that 60 represents days. So to get the last hour, would it be >= (1/24) ?
-Nothing to see. Move along.