A
Alan F
What calculation would I use in a form to display a persons age if I already
have their Date of Birth.
Many thanks in advance
have their Date of Birth.
Many thanks in advance
Art said:Hello
DateDiff("yyyy",[DateOfBirth],[Date])-----Original Message-----
What calculation would I use in a form to display a persons age if I already
have their Date of Birth.
Many thanks in advance
.
Douglas J. Steele said:Except that that's going to be wrong if the person hasn't had his/her
birthday yet.
DateDiff("yyyy", #12/31/2003#, #1/1/2004#) returns 1 year, despite the fact
it's only 1 day.
To take this into account, use:
DateDiff("yyyy",[DateOfBirth],[Date]) - IIf(Format(Date, "mmdd") <
Format([DateOfBirth], "mmdd"), 1, 0)
--
Doug Steele, Microsoft Access MVP
(No private e-mails, please)
Art said:Hello
DateDiff("yyyy",[DateOfBirth],[Date])-----Original Message-----
What calculation would I use in a form to display a persons age if I already
have their Date of Birth.
Many thanks in advance
.
Alan F said:What calculation would I use in a form to display a persons age if I already
have their Date of Birth.
Many thanks in advance