DateAdd function? Help please

Nitrous

Registered User.
Local time
Today, 14:07
Joined
Jan 23, 2003
Messages
16
Im trying to get my database query to display all records which are 21days old. I have used the command DateAdd("d",21,[Date])

[Date] is the name of my date field.

The query is a normal query, not anything special.

This query does not work, it doesn't display records at all. How can i get it to work?

I have also tried doing a DateDiff function, which also didn't work. I was going to do the difference between the [Date] Field and the current date and then do an if statement to tell it to display all records which are more than 21 days old. The original DateDiff function came up with an error.


Could someone please help asap.

Cheers
 
I'd say youre having problems because of the fieldname - you should rename this to InputDate or something.

Then the criteria <Date()-21 should work for the query.

HTH
Patrick.
 

Users who are viewing this thread

Back
Top Bottom