Last updated: before December, 1998
The following formula produces a line of text e.g. "Age: 32 yrs 6 mths". If the PEOPLE.BIRTHDATE is empty them it produces an empty text string i.e..""
If(Isblank(PEOPLE.BIRTHDATE), '', If((Month(Today()) - Month(PEOPLE.BIRTHDATE)) < 0, Combine('Age: ', (Year(Today()) - Year(PEOPLE.BIRTHDATE) - 1), ' yrs ', (12 + Month(Today()) - Month(PEOPLE.BIRTHDATE)), ' mths'), Combine('Age: ', (Year(Today()) - Year(PEOPLE.BIRTHDATE)), ' yrs ', (Month(Today()) - Month(PEOPLE.BIRTHDATE)), ' mths')))
The next formula just returns the ages in years and increments on the exact birthday:
If(Month(Today()) < Month(PEOPLE.BIRTHDATE) or Month(Today()) = Month(PEOPLE.BIRTHDATE) and Day(Today()) < Day(PEOPLE.BIRTHDATE), Year(Today()) - Year(PEOPLE.BIRTHDATE) - 1, Year(Today()) - Year(DOB))
The last forumla gives you the persons exact age in days. You can then roughly calculate how many years and months, but since months and years are different lengths the answer is an approximation, give or take a few days:
If(isblank(PEOPLE.BIRTHDATE),'',Trunc(((today()- PEOPLE.BIRTHDATE/365.25),0))