Here is how you do it. Create a field in the database of type Date. You may call it as DOB. Now create another filed for calculation purpose and call it as Age. Now you have to add a formula to the calculation field as below to let it calculate the age of the employee using system date:
Code:
If (Month(Get(CurrentDate))<Month(DOB);Year(Get(CurrentDate))-Year(DOB)-1;Year(Get(CurrentDate))-Year(DOB))
To explain you what this code it all about, it basically checks the current month against the DOB month and if it is before that month then it calculates the age in years and then subtracts one from it. In other case, the age is calculated in year.
Bookmarks