User Story
Calculate the age of a Person
Expectation
If the Person Birt Date is populated as 3/2/1983, a formula field should display 39
Note: To be able to complete this assignment, person account must be enabled.
Code
IF( NOT( ISBLANK( PersonBirthdate ) ) ,
IF( DATE( 2000 , MONTH( PersonBirthdate ) , DAY( PersonBirthdate) ) <= DATE( 2000 , MONTH( TODAY() ) , DAY( TODAY() ) ),
YEAR (Today()) - YEAR ( PersonBirthdate ),
YEAR (Today()) - YEAR ( PersonBirthdate) -1 ),
null)