Function Problems

How to Calculate Employment Length as of a Historical Date in WPS Office Excel

Rana GarciaRana Garcia Nov 13, 2026 869 views

Question details

The user wants to calculate an employee's length of service in years, months, and days as of a past reporting date instead of using the current date, including month-end reporting dates.

How to Calculate Employment Length as of a Historical Date in WPS Office Excel
Product
WPS Office Excel
Device & OS
not provided
Scenario
The user is preparing a historical HR or employment service report and needs service duration up to a specific past date rather than today's date.
Observed behavior
The usual service length calculation relies on TODAY(), so it does not reflect a past reporting date; the user needs a formula that accepts a fixed historical end date.
Before you start

Place the employee start date in one cell and the historical reporting date in another cell. Confirm both cells are valid date cells so DATEDIF returns the correct year, month, and day components.

Solution 1Recommended

Use DATEDIF with a Historical Reporting Date Cell in WPS Office Excel

Use this method when the historical reporting date is already entered in a worksheet cell and you need full years, months, and days of service.

DATEDIF is a hidden compatibility function in WPS Office Excel, but it works in formulas. The end date argument can be any valid date cell, not only TODAY(), which makes it suitable for historical service calculations.

1
Select the result cell

Click the cell where you want the employment length result to appear, such as E2.

2
Enter the DATEDIF formula

Type =DATEDIF(D14,D15,"y")&" years, "&DATEDIF(D14,D15,"ym")&" months, "&DATEDIF(D14,D15,"md")&" days", where D14 contains the employee start date and D15 contains the historical reporting date.

3
Press Enter and verify the result

Press Enter to display the combined service length, for example "3 years, 4 months, 12 days".

Use DATEDIF with a Historical Reporting Date Cell in WPS Office Excel
Result updates when date cells change: Because the formula references cells, changing the historical reporting date in D15 automatically recalculates the employment length.
Direct solution in WPS Office Excel

Calculate Historical Employment Length in WPS Office Excel

Use WPS Office Excel's DATEDIF and EOMONTH functions to calculate an employee's years, months, and days of service up to any past reporting date without relying on the current date.

  1. 1. Open your workbook in WPS Office Excel: Launch WPS Office Excel and open the workbook that contains employee start dates and the historical reporting date.
  2. 2. Enter the historical reporting date: Click the cell where you want the reporting date, type the date or enter =EOMONTH(DATE(2023,6,1),0) for a month-end date, and press Enter.
  3. 3. Insert the DATEDIF formula: Select the result cell and enter =DATEDIF(D14,D15,"y")&" years, "&DATEDIF(D14,D15,"ym")&" months, "&DATEDIF(D14,D15,"md")&" days" using your start-date and reporting-date cells.
  4. 4. Copy the formula for additional employees: Drag the fill handle down the result column to apply the formula to other employees, adjusting relative references as needed.
Uses familiar Excel functions such as DATEDIF, EOMONTH, and DATE for historical date calculationsCompatible with .xlsx, .xls, and other Microsoft Excel formats for seamless sharingFree and lightweight spreadsheet tool for HR, payroll, and reporting tasksRecalculates service length automatically when the reporting date changes
microsoft office alternative - wps office

Frequently Asked Questions

Can DATEDIF use a fixed date instead of TODAY in WPS Office Excel?

Yes. Put the historical date in a cell such as D15, and use that cell as the end date argument in DATEDIF instead of TODAY().

How do I calculate employment length up to the end of a month?

Use EOMONTH to create the month-end date, for example =EOMONTH(DATE(2023,6,1),0), and reference that cell in the DATEDIF formula.

Why does my DATEDIF formula show #NUM or #VALUE?

This usually means the start date is not earlier than the end date or one of the referenced cells is not a valid date. Check that both cells contain real dates and that DATEDIF starts with the earlier date.

How do I display the result as years, months, and days together?

Concatenate three DATEDIF parts with the "y", "ym", and "md" units, such as =DATEDIF(D14,D15,"y")&" years, "&DATEDIF(D14,D15,"ym")&" months, "&DATEDIF(D14,D15,"md")&" days".

Will the employment length update automatically if I change the historical reporting date?

Yes. Since the formula references the reporting date cell, changing that cell recalculates the years, months, and days of service automatically.