General discussion

Locked

Access 97 Date Function

By learneverything ·
In a query, I want the criteria to limit the results to only those records with a date within the previous 30 days in this field.

I've tried <=Date()-30 and
<=(Date()-30) and
(DateDiff (d, (date()))<=30) which gave me an error message.

I know I could create a field to calculate the date that is always 30 days previous to today, then have my criteria say it must be greater than the calculated field. But surely there is a compact way to do it in one field.
Thanks for your help!

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Access 97 Date Function

by mbarker734 In reply to Access 97 Date Function

Drop the equal sign, the criteria area should look like:

>Date()-31

If you want the last 30 days.

Hope this helped,

Mark

Collapse -

Access 97 Date Function

by learneverything In reply to Access 97 Date Function

Thanks. Boy was I making that harder than it had to be. If you are aware of a resource that lists functions in a more helpful way than what the expression builder does, I'd be tickled. THANKS.

Collapse -

Access 97 Date Function

by learneverything In reply to Access 97 Date Function

This question was closed by the author

Back to Software Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums