Help write SQL statement to retrieve data

S

Silvio

I need help in writing the following sql statement to retrieve data for the
last couple hours. My date field has date and time stamped in. Should be
something like "select from mytable * where DateTimeIn is between Now() and
Now()-2". Any idea?

Thank you folks.
 
K

KARL DEWEY

SELECT *
FROM MyTable
WHERE DateTimeIn Between Now() AND DateAdd("h", -2, Now());
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top