Exact age only in years

Hello, I am trying to calculate the exact age of a person, but using the formula:
FLOOR(HOUR(TODAY()-[DOB])/365/24)&" yr "&
FLOOR(MOD((HOUR(TODAY()-[DOB])/24),365)*12/365) & " mo"
the result it is not exact.

I thought about doing an IF loop like this:
IF(
MONTH(TODAY())>MONTH(DOB]),
YEAR(TODAY())-YEAR([DOB]),
IF(MONTH(TODAY())<MONTH(DOB]),
(YEAR(TODAY())-YEAR([DOB]))-1,
IF(DAY(TODAY())>=DAY(DOB]),
YEAR(TODAY())-YEAR([DOB]),
(YEAR(TODAY())-YEAR([DOB]))-1,
)
)
)

but it doesn’t calculate it exactly either.

Any suggestion?

Thanks

Based on input from past posts, I have a formula I use to calculate years worked. I believe it should work for you as well. It’s based on a similar computation your are trying only simplified.

The expression is:

HOUR(Today() - [Hire Date])/8766.00

It returns a Decimal, but I think you could use a FLOOR() function to get your desired result like so:

FLOOR(HOUR(Today() - [Hire Date])/8766.00)

This is NOT tested. Give it a try and let us know.

3 Likes