How can I calculate the number of years between 2 dates where each calendar year must count as 1 yr?
I need to calculate the number of years between Contract Start and Contract End, where the years must be counted as whole if they are within a calendar year? This calculation is being used to create Purchase Orders that must have a single line for each calendar year, irrespective of when during the year the contract starts or ends. For example:
Start Date = 5/12/2024
End Date = 12/31/2026
I need a formula that will look at this and return "3": 1 year each for 2024, 2025 & 2026. How can I create this formula, please?
Constance Fetter (she/her/elle)
Answers
-
Assuming your dates are in date format columns, you can extract the year from the date using YEAR(column@row)
where column is your column name.
Once you have the years you can do the end year minus the start year plus 1 to count the span of years.
=YEAR([End Date]@row) - YEAR([Start Date]@row) + 1
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.3K Get Help
- 445 Global Discussions
- 144 Industry Talk
- 477 Announcements
- 5K Ideas & Feature Requests
- 85 Brandfolder
- 151 Just for fun
- 72 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 302 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!