kzupancic of ACE-CRM
10/30/2018 - 6:39 PM

Contact Age

Converting a birth date to an age.

IF [Contactbirthday]>DATEADD('year',-DATEDIFF('year',[Contactbirthday],TODAY()),TODAY()) THEN

DATEDIFF('year',[Contactbirthday],TODAY())-1

ELSEIF YEAR([Contactbirthday]) <= 1900 THEN NULL

ELSE DATEDIFF('year',[Contactbirthday],TODAY())

END