Help with formula in calculating time of service

I am working on a column formula (Years of Service) to calculate the years, months and days as of TODAY from the employees’ benefits service date see formula below I am using.

=YEAR(TODAY()) - YEAR([Benefits Svc Date]@row) - IF(DATE(YEAR([Benefits Svc Date]@row), MONTH(TODAY()), DAY(TODAY())) < [Benefits Svc Date]@row, 1, 0) + " years " + IF(MONTH(TODAY()) - MONTH([Benefits Svc Date]@row) < 0, 12 + MONTH(TODAY()) - MONTH([Benefits Svc Date]@row), MONTH(TODAY()) - (MONTH([Benefits Svc Date]@row)) - 1) + " months " + IF(DAY(TODAY()) - DAY([Benefits Svc Date]@row) < 0, 30 + DAY(TODAY()) - DAY([Benefits Svc Date]@row), DAY(TODAY()) - DAY([Benefits Svc Date]@row)) + " days"

However, I am not sure I’ve got it correct. For example the two highlighted below, the one with a benefits date of 8/14/2023 is calculating 0 years -1 months 24 days, should it not be calculating 0 years 11 months 24 days? Am I missing something? Any guidance would help thank you!

Tags:

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!