Calculating age using diff2dates

  • Thread starter Thread starter Nikkiewolf
  • Start date Start date
N

Nikkiewolf

Can anyone help?

I need to calculate age in years, months and days from a date field. I
found an early post and tried the suggested 'diff2dates' function but cannot
get it to work. The result in my age field is '#name?'. I've tried the
datediff function on the same field and successfully get the number of years
difference so I am not sure what I am doing wrong. I am fairly new to
Access so that has probably got something to do with it.

Many thanks,
Nikkie
 
It would help if you posted what you tried. You should be using something like:
Diff2Dates("ymd",SomeDate,SomeOtherDate,True)


John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
Hi John,

Thanks for responding to my post. I thought the 'Show Zero' was optional so
after looking at your example I've just tried adding 'True' to my code and it
all works now.

Thanks again!
Nikkie
 
The show zero is optional.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
Back
Top