Calculates a persons age.
Calculates a persons age.
Rate Calculates a persons age.
(1(1 Vote))
Dim intAge As Integer
Dim datThisYearsBirthday As Date
datDateOfBirth = Format(datDateOfBirth, "mm/dd/yyyy") 'Standardize Input
datThisYearsBirthday = Left(datDateOfBirth, 5) 'Year defaults to current year
intAge = DateDiff("yyyy", datDateOfBirth, Now)
If Now < datThisYearsBirthday Then intAge = intAge - 1
CalculateAge = intAge
End Function
Calculates a persons age. Comments
No comments yet — be the first to post one!
Post a Comment