TeamDesk Knowledge Base & Support

   Home      FAQ      Forum      Idea Exchange      Ask a Question      My Stuff      Help   
Age formula
Here is a simple & pretty accurate Age formula:

If(AdjustYear([DOB],Year(Today()) - Year([DOB]))>Today(),Year(Today()) - Year([DOB]) - 1,Year(Today()) - Year([DOB]))

Jorge Solá
Date Created
2/6/2017 5:31:03 PM
Date Updated
2/7/2017 1:50:17 AM
cooper collier  2/6/2017 5:52:10 PM
I am trying to wrap my mind around it. I think it give you the age in years, and takes into account the persons actual birthday?

We have been using this formula,
Floor((ToDays(Today() - [Patient Date of Birth]) / 366))
It has always been accurate to what our clients needed. I think depending on the exact day, the formula is run, it could give a date a year younger?
(NOBODY ever complains! <grin>)

Jorge Solá 2/6/2017 5:59:49 PM
Your formula is pretty much accurate. You could make it a bit more accurate if you divide by 365.25 instead of 366.
But then, since it does not take into account whether the person was born in a leap year or a non-leap year, it can lead to small disadjustments of several days.
The formula I propose:
calculates the num

Jorge Solá 2/6/2017 5:59:56 PM

cooper collier  2/6/2017 6:07:06 PM
I see. I will put it in my notes for when I need a more accurate formula.
Jorge Solá 2/6/2017 6:07:30 PM
This is what the formula does, for instance, with someone born on December 15, 1975.
1) Calculates the difference in years between the present year & the year of birth (2017-1975=42)
2) It adds this number of years to the date of birth with the AdjustYear formula (result: December 15, 2017).
3) If the resulting date is in the future (the person didn't yet have their birthday this year), it takes the number in 1) & substracts 1.
4) If the resulting date is today or is in the past (the person already had their birthday this year), it returns the number in 1).
So the formula is accurate to the day.
Slava Shinderov  Staff  2/7/2017 1:50:17 AM
Please try following formula:

Year(Today()) - Year([Birthdate]) - If(DayOfYear(Today()) < DayOfYear([Birthdate]), 1, 0)
Back to Search Results