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
- Customer Resources
- 64.8K Get Help
- 437 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 67 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!