Link to home
Create AccountLog in
Avatar of msmerry
msmerryFlag for Australia

asked on

More than 180 days before today's date

ccess 2010
I have an update query where I want to find anyone whose MemberStatus is 1 AND who enquired more than 180 days before today, then update their status to 4.  The date field -DateEnquired - is set to Short Date. The Criteria is <Date()-180.  This returns an error message.
What am I missing?
UPDATE-BASED-ON-DATE.JPG
Avatar of Kelvin Sparks
Kelvin Sparks
Flag of New Zealand image

Use the DATEADD function
<DATEADD("d", -180,DATE())

Kelvin
Avatar of msmerry

ASKER

Thanks Kelvin,
Tried that but it doesn't work.  
I would guess that it is looking for a specific date - exactly 180 days before today - in other words,  take 180 days off today; if there is no such entry, then it returns nothing.

What I want is Find all dates greater than 180 days before today - somewhere it requires <. or is it >?
Aileen
Do you mean within the last 180 days or more than 180 days ago?

Kelvin
ASKER CERTIFIED SOLUTION
Avatar of Kelvin Sparks
Kelvin Sparks
Flag of New Zealand image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of msmerry

ASKER

MAny thanks - always beneficial to come to EE