Access DateDiff Function Trouble - Help!

mahunter

New member
Local time
Today, 13:05
Joined
Nov 5, 2013
Messages
8
All,

I'm having trouble with the Access DateDiff Function. I'm using this function in an unbound text box on a form and I get a Name? error even if I enter actual dates versus other fields on the form.

Here's the syntax of the expression:

=DateDiff("d",[11/25/13],[11/15/13])

Eventually I want the expression/calculation to calculate the run days of a piece of equipment subtracting the current date from the equipment(wire) install date to calculate run days

=DateDiff("d",[Date()],[DWP Top Wire Install Date])

Note either way I do this I get the Name? error. The text box is formatted as a General Number and the DWP Top Wire Install Date is setup at a Date/Time field.


Any help would be much appreciated,

Mark:confused:
 
Well, the second wouldn't have brackets around the Date() function:

=DateDiff("d",Date(),[DWP Top Wire Install Date])

To hardcode dates:

=DateDiff("d",#11/25/13#,#11/15/13#)
 

Users who are viewing this thread

Back
Top Bottom