Formula to calculate Age from date field.For Example Birthdate is date field in contact Object.
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)
Sample Output:
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)
Sample Output:
No comments:
Post a Comment