Hi Honeycoders,
I'm not sure if this has bneen asked before, I couldn't find any post about it.
I'm trying to build a timesheet app and have a start time and an end time. When I subtract one from the other I get very strange results
The sub total = [End] - [Start]-[lunch]
Both end and Start are Time
Lunch is number to 2 decimal places.
Sub Total is formatted as a number to 2 decimal places
When I try and get results , even from [End] - [Start] I get funny results.
In Google Sheets date/time or time is a single number and you have to use a conversion factor to get the correct result, I'm not sure how Honeycode manages this.
Any advice would be greatly appreciated.
Thank you in anticipation,
I believe the issue is in the Lunch variable type. It should be date as well but you can remove the AM / PM using column formats. please find the screenshot for more clarification.
All formats should be date, even the Total Hrs. Just change how to display the time format.
Hi Meezal,
Thank you for your reply. I did go down that track BUT! Try putting in "0" lunch hours and it defaults to 12:00:00AM so that messes up the formula.
I ended up using =HOUR([END]) and =MINUTE([END]) to convert the End and Start to lowest common denominator of Minutes and then multiplied Lunch bu 60 to convert that to minutes, then after doing arithmatic dividing the Total hours by 60 to bring it to Fractional hours, that worked.
Thank you for your help,
kind regards,
Max
Can you (or another user) explain the process you used to do this using the actual formula as an example? I get a circular ref when using the formula as you have written it above.
I'll also note that Honeycode has a Timesheet Template, which does similar calculations on the timesheet details screen. That is a great example to deconstruct to see how you can calculate time.