Focal Point
Calculation of a person's age

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5341028331

January 06, 2005, 03:00 PM
<mbroxter>
Calculation of a person's age
I am working on a report that will calculate a person's age based on two dates.

Both dates are in a YYMD Focus date format.
AGE/I3 = DATE_OF_LOSS - DATE_OF_BIRTH;

This calculation returns the number of days between the dates. I am looking for a formula that would take the number of days and convert it to years. Or is there a built in function to calculate the person's age?

Thanks.
January 06, 2005, 03:10 PM
susannah
and dividing by 365 wont work because of the leap year thing, right?
you want exact age ? or just years?
If just years, take the year part of each date and subtract. if birth monthday LT current monthday, subtract 1.
If exact, ... you get the idea.
January 07, 2005, 11:53 AM
<mbroxter>
I figured I probably would have to do it the way you have described. I was hoping there was a built in function to do it.

Thanks for the reply.
January 09, 2005, 08:09 PM
andrew w
How about DATEDIF ( DATE_OF_BIRTH, DATE_OF_LOSS, 'Y')??

Cheers

Andrew W
January 09, 2005, 09:24 PM
Piipster
Working in HR we just divided by 365.25 to get the number of years.
January 09, 2005, 09:30 PM
Leah
We calculate the difference and divide by 365.25 to calculate age.

Never thought much about leap years in this process.