How to determine an age

sandhurstUK

Must change my user name
Local time
Today, 23:25
Joined
Feb 15, 2002
Messages
42
The following control source on a form field is designed to determine the age of a person:

=DateDiff("yyyy",[Birthday],Date())

However, a person with say a birthday of 20/07/1944 (UK date format) who is currently 58 years old, returns an age of 59 due to the fact that the calculation of age is only taking into account the year.

How then can you take the month into consideration, in order that in this example the person would not show as being 59 until his birthday on 20th July ? I have tried various methods of including the month in the formula but to no avail.

Thanks
 
Cracked It

I must remember to use the many examples in the search function where I found this, which works fine:

=Format(Date()-[Birthday],"yy")

Sorry for the bother
 
There might be a better way to do this but my first thought was for it to calculate the number of days between the two and then divide by 365. But then of course you would have to deal with discrepencies such as leap year.

I'll let you know if I think of something better.
 
There have been numerous posts here on calculating "Age", search for the one that suits your needs.
 

Users who are viewing this thread

Back
Top Bottom