Calculating Age from DOB
In numbers I can use =DATEDIF(--DOB Cell--,NOW(),"Y") to claculate age from date of birth. Being new to FMP12, how can I do this in FMP??
Get ( CurrentDate ) - DateOfBirthField
will compute the age of an individual in days.
To compute the age in years:
Let ( [ T = Get (CurrentDate ) ;
Yb = Year ( DateOfBirthField ) ;
Yt = Year ( T ) ] ;
Yt - Yb - ( Date ( Month ( DateOfBirthField ) ; Day ( DateOfBirthField ) ; Yt ) > T )
Make sure to make this a field of type calculation and use the storage options button to make this an unstored calculation or it will not correctly update as time passes.
Retrieving data ...