By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,466 Members | 2,523 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,466 IT Pros & Developers. It's quick & easy.

Date/Time Criteria for a Query

P: 2
I simply want the Criteria code to have a query show data that is more than one year old.

Simple enough in Excel
=NOW()-365
but
Data()-365
does not work in MS Access

Thank you for the assistance
Mar 7 '08 #1
Share this Question
Share on Google+
4 Replies


Delerna
Expert 100+
P: 1,134
Hi midsy
NOW()-365 works in access also
In your query, just put in the criteria for the column where it applies
Mar 7 '08 #2

FishVal
Expert 2.5K+
P: 2,653
DateAdd("yyyy", -1, Date())
Is more strict method to get a date one year ago.

Regards,
Fish
Mar 7 '08 #3

P: 1
Date()-365
or
Now()-365

in your query will return records exactly 1 year old

Try:

<date()-365

or

<now()-365

for all records less than 1 year old.
Mar 7 '08 #4

P: 2
Thanks muchly - have a great week
Mar 10 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.