Calculate the Age of an User or Contact #inSalesforce

Calculate the Age of an User or Contact #inSalesforce


Create a formula field returning Number

CASE(MONTH(TODAY()) - MONTH(Birthdate),
0,
IF(DAY(TODAY()) >= DAY(Birthdate), YEAR(TODAY()) - YEAR(Birthdate), YEAR(TODAY()) - YEAR(Birthdate) - 1),
IF(MONTH(TODAY()) < MONTH(Birthdate), YEAR(TODAY()) - YEAR(Birthdate) - 1, YEAR(TODAY()) - YEAR(Birthdate))
)

Comments