Dears,
Need help in populating the month and year after entering the date of birth
in a field. Tried below but only gives me the number of years
age = DateDiff("yyyy", [dob], Now()) + _
Int(Format(Now(), "mmdd") < Format([dob], "mmdd"))
any suggestion is appreciated
Thanks
Nicole
Graham R Seach - 20 Apr 2005 13:57 GMT
Gerald,
To get the number of years:
Age = DateDiff("yyyy",dte1,Date) + (Format(dte1,"mmdd") >
Format(Date,"mmdd"))
To get the number of years, months, days, etc:
http://www.pacificdb.com.au/MVP/Code/Age2.htm
or
http://www.pacificdb.com.au/MVP/Code/Diff2Dates.htm
Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
---------------------------
> Dears,
>
[quoted text clipped - 10 lines]
>
> Nicole