Stuart Green
Registered User.
- Local time
- Today, 16:57
- Joined
- Jun 24, 2002
- Messages
- 108
I am trying to work out the number of years since a client was contacted using the expression below in a query
where [lastcontact] is a date field.
contact: ((Date()-[lastcontact])/365)
This works fine until I try to put a criteria on it. If I want to see all those that it has been 3 years or more since I contacted them, then this works
>=3
But if I put in a prompt criteria [How many years since last visited] then I get wrong results, the equivalent of asking >="3"
Any pointers as to where I am going wrong please
where [lastcontact] is a date field.
contact: ((Date()-[lastcontact])/365)
This works fine until I try to put a criteria on it. If I want to see all those that it has been 3 years or more since I contacted them, then this works
>=3
But if I put in a prompt criteria [How many years since last visited] then I get wrong results, the equivalent of asking >="3"
Any pointers as to where I am going wrong please