DateDiff error

  • Thread starter Thread starter Betty K
  • Start date Start date
B

Betty K

I'm using the following formula in a form to calculate the # of yrs between a
date in a table and the beginning of 2009:

=DateDiff("yy",[#01/01/2009#],[Contacts]![Join Date])

The error #Name? populates the cells. What am I doing incorrectly?
 
On Mon, 5 Jan 2009 00:37:00 -0800, Betty K

Allen already gave you the solution. To answer your question: the
brackets arount the date turn it into a field name, just like [First
Name] would, and that field name does not exist. Thus the second
argument does not contain a legal date.

-Tom.
Microsoft Access MVP
 
Thank you!

Allen Browne said:
Try:
=DateDiff("yyyy", #01/01/2009#, [Join Date])

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Betty K said:
I'm using the following formula in a form to calculate the # of yrs
between a
date in a table and the beginning of 2009:

=DateDiff("yy",[#01/01/2009#],[Contacts]![Join Date])

The error #Name? populates the cells. What am I doing incorrectly?
 
Back
Top