Scenario
Create a custom Entity field that computes for an employee’s age in year(s), month(s) and day(s).
Solution
Birth Date: 4/12/1987
Custom Field Output: 31 Years 9 Months 26 Days (as of 2/4/2019)
-
Navigate to Customization > Lists, Records, & Fields > Entity Fields > New
-
Label = Age
-
Type = Free-Form Text
-
Store Value = F
-
Applies To subtab > Employee = T
-
Display subtab > Subtab = Human Resources
-
Validation & Defaulting subtab > insert the formula below in the Default Value field
FLOOR(ROUND((({today} - {birthdate})/365.2425),2))||(' ')||('Years ')||FLOOR(ROUND((((ROUND((({today} - {birthdate})/365.2425),3))-FLOOR(ROUND((({today} - {birthdate})/365.2425),3)))*12),3))||(' ')||('Months ')||FLOOR(ROUND(((ROUND((((ROUND((({today} - {birthdate})/365.2425),4))-FLOOR(ROUND((({today} - {birthdate})/365.2425),4)))*12),4)-FLOOR(ROUND((((ROUND((({today} - {birthdate})/365.2425),4))-FLOOR(ROUND((({today} - {birthdate})/365.2425),4)))*12),4)))*31),4))||(' ')||('Days') -
Click Save