DateDiff

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
 
G

Gary Miller

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
________________________
 
B

Bruce M. Thompson

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)

:)
 
F

fredg

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top