Inconsistent time calculations

Hello there. I have a created my own timesheet app and have run into an issue with the time calculation. as per the image, the top row calculates correctly but the bottom record does not. I have removed the value for both start and end time, and recreated the record but to no avail. Any suggestions on how to fix this?
TADABASETC

That’s very strange. Can you share the equation you’re using?

({ENDTIME} -{STARTTIME})/10000.
I added the 10000 because it needed it. I also tried TimeDiff but could not figure out the formula. and could not find any reference material in the help.

Have you tried to use the Date Formula field and changed the display output to hours? I to know that the TB native date/text/number formula fields don’t work in all instance and thus you would need to use an equation field.

You could also try this equation:

CONCAT(HOUR(TIMEDIFF({End Date/Time}, {Start Date/Time})), '.', LPAD(MINUTE(TIMEDIFF({End Date/Time}, {Start Date/Time})), 2, '0'))

I could, but the two fields in question are time fields. I’m not sure what impact that has. My initial thought was that I should use a date time field. But was sure about adding a time picker derived from a date/time field

This works I believe,

TIMEDIFF(TIME({Time End}),TIME({Time Start}))

12:30:00 (means 12 hours and 30 minutes worked.)

results

or this

LEFT(TIMEDIFF(TIME({Time End}),TIME({Time Start})),5)

time2

Ok, I’ll give it a try. Thanks

@SBAS, my recommendation is to absolutely use a date/time field instead of just a time. If the time spills over a 24 hour period it will cause calculation errors or challenges.

Just my two cents,
Adam

1 Like

My apologies I did try some of the aforementioned formulas and they did work. They do add hours of properly. At some point in the future, I may have to change the display units from 13 hours and 30 minutes to 13.5 hours. I can’t express how wonderful this platform is in under a month I think I have learned so much. There are some things I do want ro do. Especially there are some things I need to ask the community in respect to database theory. But I can wait for another day.

1 Like