Type mismatch in expression datediff

CharlesWhiteman

Registered User.
Local time
Today, 14:55
Joined
Feb 26, 2007
Messages
421
I'm using the following in a query but I keep getting Type Mismatch In Expression Error.

Regdate is a Date/Time Field in my Db.

Code:
Expr1: DateDiff("d",Date(),[RegDate])
 
What about:
Code:
Expr1: DateDiff("d",Date(),CDate([RegDate]))
 
Thanks however I am a clot! The error was because of another field unrelated and an incorrect relationship between them in the query. It works as it was having solved that problem!
 
Just a reminder that for the DateDiff, the EARLIEST date comes first. So, if RegDate is earlier than today it shouild be in the first slot, or else you will get negative numbers.
 

Users who are viewing this thread

Back
Top Bottom