SAP Knowledge Base Article - Public

2707073 - How to calculate Age / Service Period in Days / Months / Years in ORD / Report Canvas


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


  1. Age / Service Period in Days:
    1. Create a new Calculated Column in the report / query.
    2. Use the Token Editor and insert the Dynamic Date Variable 'Today'

    3. Subtract the desired date value (example: Date of Birth) from %TODAY%.

    4. This field will fetch the Age / Service period in Days.

  2. 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.

  3. 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


SAP SuccessFactors HXM Suite all versions