This article explains how the Age / Service period based on a specific date can be calculated in Days / Months / Years.
Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
SAP SuccessFactors HCM Suite
- Age / Service Period in Days:
- Create a new Calculated Column in the report / query.
- Use the Token Editor and insert the Dynamic Date Variable 'Today'
- Subtract the desired date value (example: Date of Birth) from %TODAY%.
- This field will fetch the Age / Service period in Days.
- Age / Service Period in Years:
The 'Age' for a specific date field can be calculated using the 'Age' function available in ORD calculated columns as well.
This however will give a rounded down value.
Create a new calculated column based on the 'Age -Days' calculated column created earlier, and use the following calculation.
Note: Dividing by 365.25 is an approximation of years, including the extra day in leap years.
- Age / service Period in Months.
Multiplying the (more precise) Years obtained in the previous step with 12 will fetch the months.
Example of all the three calculations:
The Column formatting option can be used as and when required, to control the number of decimal places in the results.
Age, in, Years, Months, Days, Calculate, Service, ORD, Online, Designer, Report, Canvas, Rounding, off, Calculated, Column, Create, Date , KBA , LOD-SF-ANA-ORD , Online Report Designer , How To