Kathy W
02-25-2002, 07:25 AM
I would like to calculate a persons age on March 1 2002 using the date of birth field. I have entered the expression DateDiff("yyyy",#3/1/02#,[Birthdate]) This gives me the correct age in years with a minus sign in front ie -25, but does not differentiate between birthdates before or after March 1 2002. I would appreciate some help Thanks. Kathy
Kathy W
02-25-2002, 12:46 PM
So where do I put iif() ? Thanks for help
Alexandre
02-25-2002, 12:59 PM
What do you mean by "does not differentiate between birthdates before or after March 1 2002. "?
For example:
if [Birthdate]< #3/1/02# then
msgbox "Was not born at that time"
else:
msgbox "Is " & DateDiff("yyyy",#3/1/02#,[Birthdate]) & " years old"
end if
Alex
[This message has been edited by Alexandre (edited 02-25-2002).]