DateDiff

  • Thread starter Thread starter Cliff Waters
  • Start date Start date
C

Cliff Waters

Please could someone help me I am using this formula
=DateDiff([w],TRAINING!ENROLMENT_DATE,TRAINING!COMPLETION_DATE)
to try to calculate the difference between two dates but I just get #Name in
the cell where am I going wrong
Thanks Cliff
 
Cliff,

I believe it is the brackets plus the ! reference to the
field. This may work if you are referring to two different
controls on a form and if that is really how the enrollment
field is spelled...

=DateDiff("w",ENROLMENT_DATE,COMPLETION_DATE)


--

Gary Miller
Gary Miller Computer Services
Sisters, OR
________________________
 
Please could someone help me I am using this formula
=DateDiff([w],TRAINING!ENROLMENT_DATE,TRAINING!COMPLETION_DATE)
to try to calculate the difference between two dates but I just get #Name in
the cell where am I going wrong

Try this (note the quotation marks):

=DateDiff("w", TRAINING!ENROLMENT_DATE, TRAINING!COMPLETION_DATE)

:-)
 
Cliff said:
Please could someone help me I am using this formula
=DateDiff([w],TRAINING!ENROLMENT_DATE,TRAINING!COMPLETION_DATE)
to try to calculate the difference between two dates but I just get #Name in
the cell where am I going wrong
Thanks Cliff

The difference in what? Days? Weeks? Years?

Days?
=DateDiff("d",[ENROLMENT_DATE],[COMPLETION_DATE])
Weeks?
=DateDiff("ww",[ENROLMENT_DATE],[COMPLETION_DATE])
Years?
=DateDiff("yyyy",[ENROLMENT_DATE],[COMPLETION_DATE])

Open any VBA code window.
Type DateDiff
Select the word and press F1.
The DateDiff Help file will open.
It contains all the information you will need.

Also, make sure the name of the control is not the same as the name of
any of the fields used in the expression.
 
Back
Top