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
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
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 435 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!