DateDiff formula

IYG

New member
Local time
Today, 17:46
Joined
Jan 25, 2008
Messages
3
Hello,
I create query that subtract “schedule date” (mm/dd/yyyy) and “deliver date” (mm/dd/yyyy) to calculate difference deliveries days. I used function DateDiff different ways but query doesn’t work.

Expr1: DateDiff("mm/dd/yyyy","SCHEDULE DATE","DELIVERY DATE »")
And I have error: “data type mismatch in criteria expression” or doesn't work.

Thanks for helping.
 
The Date Diff function uses this syntax:
Code:
Expr1:DateDiff("d",[Schedule Date],[Delivery Date])
 
I still have error: “data type mismatch in criteria expression”
 
Then one, or both, of your date fields is not stored as a date, but as text. use CDate to convert it/them.
 
Bob,they stored as a date (short date format -6/12/1995).

Thanks for your help.
 
then did you use the square brackets like I showed, or did you use the quotes in your original example. You don't use quotes.
 

Users who are viewing this thread

Back
Top Bottom