Date range

K

Ken

Despite my attempts to understand the help screens in
Access, I'm having trouble getting my query to list only
records from the last year (365 days). The help screens
say that this should work
Between Date() And Date()-365
but I keep getting errors. Help me to understand what
I'm doing wrong.
 
V

Van T. Dinh

To be more precise (remember, there are leap years), you should be using:

BETWEEN DateAdd("yyyy", -1, Date()) AND Date()

Is the Field you used in the criteria a DateTime Field?

What error message did you get?
 
K

Ken

Yes it is a DateTime field. I tried both my expression
and your and got the same error "undefined
function 'date' in expression"
 

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