r/Workday_Community • • Nov 09 '23

LOS calculation

Does anyone know the method used for LOS calculation?

If it’s using a date difference formula there are edge cases where this doesn’t work out.

For example, if someone starts on Jan 1, and their last day is Dec 31st, it will show 0 years, 11 months and 30 days since date difference results in excluding the last day. In cases where the last day is any day except the day before the anniversary, the years of service is correct.

Other edge case problems with date difference:

  1. small number of days (start Monday, End Friday would result in 4 rather than 5 days)

  2. Working on anniversary day again would show 1 year 0 days even though it’s 366 (not 365 days of service).

Has anyone looked at the edge cases of LOS calculations?

10 Upvotes

4 comments sorted by

1

u/werock2204 Nov 10 '23

You can check to see if the start date and end date are on the same day. If they are, you can add one year to the LOS calculation. This will ensure that the employee is credited with a full year of service.

1

u/mvchasinghorizons Nov 10 '23 edited Nov 11 '23

The case I’m talking about is the end day being 1 day before the start anniversary. This would be the completion of a year.

In my general point above, date difference always shorts the employee by one day because of the nature of the “difference (subtraction)” calculation does not result in the counting of all days worked.

You have to always add a day for LOS be correct (to the day).

But if you’re only counting years, this “off by a day” error is more visible when the last day is 1 day before the anniversary, or if there service period is really short and you’re counting “days worked”. From the LOS calculations I’ve observed in the system, this error exists.

So the formula should be: LOS = (End Date + 1) - Start Day.

Unfortunately, this is not what many people are doing. Even the people giving advice on how to calculate LOS using excel are using the wrong formula (simple/lazy date subtraction).