 # Time Calculations

I have a daily log of worked shifts over 12 months period with the following structure:

ShiftStart_DateTime | ShiftEnd_DateTime | Total hours between a shift
01/05/2020 08:00 am | 01/06/2020 9:00 am | 1 days 1 hrs 0 mins

Note: Total hours between a shift Calculated using array formula discussed in this forum
={“Total hours between a shift”;ARRAYFORMULA(IF(ISBLANK(A2:A),"",INT(C2:C-B2:B)&" days “&TEXT(C2:C-B2:B,“h”” hrs ““m”” mins “”")))})

and trying to produce a report to show total hours made on monthly basis i.e.
Month | Total Hours
Jan | 20
Feb | 10

Dec | 30
Totals | 60

and I am not sure how to go about.

Try this formula. It will give you a number formatted in hours. Then you can simply do a sum on the value.

`={"Total hours between a shift";ARRAYFORMULA(IF(ISBLANK(A2:A),"",(C2:C-B2:B)*24))}`

Thanks @Jeff_Hager . As I have a log over 12 months how do I sum the number of hours worked per month? Showing how many hours worked per month.

Here you go:

1 Like

Thanks a million @Jeff_Hager for your assistance.

1 Like

Any chance time calculations make it into the Glide Editor? Now that date/time can be easily formatted in the editor, if you could calculate the time between two “Time Only” values, you could easily run a number of calculations without any lag in the app. I could see issues with times that go over two dates, but this could be limited to simple calcs of same-day times.

1 Like