Formula for # of Years
Does anyone have a formula to calculate the number of years from a given date? Example
Hire Date : 5/23/2020
Today's Date: 5/23/2022
Years of Service: 2
Thanks!
Answers
-
Hire Date: 01/02/2020
Today's Date: 05/23/2022
Years of Service: 2 (rounded to 0 decimal place)
=ROUND(NETDAYS([Hire Date]@row, TODAY())/365,0)
Years of Service: 2.4 (rounded to 1 decimal place)
=ROUND(NETDAYS([Hire Date]@row, TODAY())/365,1)
Explanation
- Use NETDAYS() to find the number of days elapsed between two dates.
NETDAYS([Hire Date]@row, TODAY())
- Divide the number of days elapsed by 365 to arrive at the number of years.
NETDAYS([Hire Date]@row, TODAY())/365
- Use ROUND() to round to the desired decimal places.
ROUND(NETDAYS([Hire Date]@row, TODAY())/365,0)
Documentation on Smartsheet functions can be found at https://help.smartsheet.com/functions
Cheers!
- Use NETDAYS() to find the number of days elapsed between two dates.
-
As an alternative to @Toufong Vang 's excellent formula, depending on how close to exact you want to be, you could always just subtract the year values:
=YEAR(TODAY()) - YEAR([Hire Date]@row)
2022 - 2020 = 2
Regards,
Jeff Reisman, IT Business Analyst & Project Coordinator, Mitsubishi Electric Trane US
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
Help Article Resources
Categories
Check out the Formula Handbook template!