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
- Customer Resources
- 65.3K Get Help
- 445 Global Discussions
- 143 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!