Help with TIME() Formula
Hello,
I am testing out the TIME() function and working on a formula to determine the amount of hours and minutes elapsed between a Start and Finish columns. I thought I had it figured out, however, I noticed that for my row that has a Start time of 3 pm and a Finish time of 5 pm, it was showing a time difference of "1 hour(s) and 60 minutes." Why is is not showing 2 hours and 0 minutes?
Formula used:
=IFERROR(ROUNDDOWN((TIME(Start@row) - TIME(Finish@row)) * 24) + " hour(s) and " + ([Time Difference - decimal]@row * 24 - INT([Time Difference - decimal]@row * 24)) * 60 + " minutes", " ")
Answers
-
Hi @kelceyg
This occurs because the TIME() function has limitations for this use case.
We can explore a different approach.
Something like this perhaps:
=IFERROR(INT([Time Difference - decimal]@row * 24) + " hour(s) and " + MOD([Time Difference - decimal]@row * 1440, 60) + " minutes", " ")
or maybe:
=IFERROR(INT(([Finish]@row - [Start]@row) * 24) + " hour(s) and " + MOD(([Finish]@row - [Start]@row) * 1440, 60) + " minutes", " ")https://www.linkedin.com/in/zchrispalmer/
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.1K Get Help
- 414 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 141 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!