Calculating total hours / minutes

I have repeating group that has clock in and clock out time. I have been able calculate time difference and show it on the each row. Now I want to calculate a total time(summary) from all rows. It seems to be a bit tricky. Any help?

There are a couple of ways of going about it. Largely depends on how you’ve structured your database. Though here’s what I would recommend.

At a base level, you likely have two date-based fields: clock-in time and clock-out time. Update your database structure to include a field called “interval” and format the field type as “date interval”. This will format the date value as an exact millisecond value, which you can then convert display into a different form.

When your user clocks out, within the make changes to a thing workflow, you’ll also update the “interval” field. The structure should look something like Clock Out Time’s value - Clock In Time’s value.

Finally, on the repeating group, you can have a function that sums everything up. (Ie. Repeating group’s Time Log Event’s Intervals:sum.

1 Like

Hey Dan, I added date interval field and it’s working fine on a row level. Thanks for this. It allows me to add “brakes if it’s needed”.

I’m still not able to sum all the intervals fields so that I can get a total summary. I’m not able to find :sum

If you’re comfortable doing so, mind sending me a link to your editor in a private message?

If your data structure is set up correctly, you should see options that look like the video below.

Could you show a screen shot of the database structure for this? I believe that would be very useful for others as it is an integral part to replicating this very helpful technique which could help a lot of users with creating appointment booking apps.


Hello Dan. Your reply gave me multiple answers so I figured I ask you. So I am making a clockin site for a Roleplay community (staff need a certain amount of hours mod patrolling each day) and wanted something like

Do you know why it is displaying like this? I want it to display like: HH:MM.

Screen Shot 2021-05-04 at 7.14.21 PM




Hello, I need to play in the field (Time2) 2 hrs longer than the field (Time1) and in the database this field is in the “Option Sets” always registered like this: 01:30 being 01 the hour and 30 the minutes … Can someone help me?