I want to select all records from a table where the DateAdded field's date and time (Default value Timestamp field) is more than say 3 hrs ago.

eg: something like

SELECT tbldata.* FROM tbldata WHERE (tbldata.DateAdded <= now()-3);

I can get it working with days difference but do not seem to be able to get the hours difference.

If anyone can guide me along the right lines it would be appreciated.



SELECT tbldata.* FROM tbldata WHERE (tbldata.DateAdded <= DATE_SUB(now(), INTERVAL 3 HOUR));

Many thanks for the speedy reply.

Much appreciated.