Easiest solution I have for (time)-(time)=duration
I always look here for solutions to my ideas before I spend too much time on them. I was not able to find a simple solution for doing calculations with time. Honestly, after my initial search, I ended up exporting to excel to do the math, then importing back in.
Long story short, here is a single formula to subtract start time from end time and provide a duration. Times are HH:MM 24 hour format. Works great for tracking time spent on different projects via a mobile form.
Snip with formula and column names for reference: https://ibb.co/dBYrDGJ
Formula for copy paste:
=(IF((VALUE(RIGHT([End time]@row, 2)) - VALUE(RIGHT([Start Time]@row, 2))) > 0, (VALUE(LEFT([End time]@row, 2)) - VALUE(LEFT([Start Time]@row, 2))), (VALUE(LEFT([End time]@row, 2)) - VALUE(LEFT([Start Time]@row, 2))) - 1)) + ":" + (IF((VALUE(RIGHT([End time]@row, 2)) - VALUE(RIGHT([Start Time]@row, 2))) < 0, 60 + (VALUE(RIGHT([End time]@row, 2)) - VALUE(RIGHT([Start Time]@row, 2))), (VALUE(RIGHT([End time]@row, 2)) - VALUE(RIGHT([Start Time]@row, 2)))))
Answers
-
Here is a link to a number of time based solutions that you may want to check out if you ever have any other bits you need to solve for:
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64K Get Help
- 412 Global Discussions
- 220 Industry Talk
- 459 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 138 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!