Formula to calculate the amount of time between two dates
I'm trying to use the below formula to calculate the amount of days between when a project is due, and when it was actually finished. Sometimes this will be earlier than the due date, sometimes after.
=NETWORKDAYS([Delivery Date]98, [Power Approval]98)
When the dates are the same, I'd expect the result of zero. But it returns one.
When the project is finished a day early, I'd expect a result of -1. But it returns -2.
When the project is finished a day late, I'd expect a result of 1. But it returns a 2.
What can I add to this formula to get this right? Or is there a better one out there to try?
Comments
-
Hello,
Smartsheet treats a single day task as one working day—this concept extends to functions. NETWORKDAYS and other working day functions are designed to count the number of working days between two dates, not necessarily take the difference between two dates.
If you're looking for a different result, you might consider adding a +1 to your function:
=NETWORKDAYS([Delivery Date]98, [Power Approval]98) +1
Otherwise, you can consider taking the difference between the two dates:
=[Delivery Date]98-[Power Approval]98
This option might result in decimal values (not an exact 1 or 0), as one of your date columns will be treated as the end of the working day, and the other as the start of the working day.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.2K Get Help
- 445 Global Discussions
- 143 Industry Talk
- 476 Announcements
- 5K Ideas & Feature Requests
- 84 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!