function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Glenn Urquhart 1Glenn Urquhart 1 

Formula checkbox set to TRUE according to person's age

Hello

I'm trying to create a formula checkbox that will be set as true if the person is greater than or equal to age 54 (I'll be referencing the Date of Birth field in the Contact record) - can anyone help me with the code syntax?

Thanks!
Jayeshkumar ParmarJayeshkumar Parmar

Hello Glenn Urquhart 1,
Please try the below formula to your formula field,


IF(IF( NOT( ISBLANK( Birthdate ) ) ,
IF( DATE( 2000 , MONTH( Birthdate ) , DAY( Birthdate ) ) <= DATE( 2000 , MONTH( TODAY() ) , DAY( TODAY() ) ),
YEAR (Today()) - YEAR ( Birthdate ),
YEAR (Today()) - YEAR ( Birthdate ) -1 ),
null) >= 54,True, False)
 
Thanks,
Jayeshkumar Parmar

Glenn Urquhart 1Glenn Urquhart 1
Thanks for your help Jayeshkumar Parmar!
Jayeshkumar ParmarJayeshkumar Parmar

Hello Glenn Urquhart 1,

Please Mark It As Best Answer If It Helps Thank You!