Forums

This topic is locked

filter last week

Posted 01 Apr 2002 22:01:27
1
has voted
01 Apr 2002 22:01:27 Dave Clarke posted:
hi all

would the following sql in access2000 filter a table and produce only entries in the last week? i have tried it but the date field in the db is autodate so it wont let me enter any records for the last week to test it.
i added a record today and the query only finds that one so it appears to work but i'm a beginner so i could do with your opinions.

SELECT *
FROM Messages
WHERE ((Messages.MessageDate>Date()-7))
ORDER BY Messages.MessageDate DESC;

Reply to this topic