I am using Google sheets to record rental data. The table looks like this:
[Client Name] [Product Code] [Product Name] ... some irrelevant columns ... [Rental Start] [Rental End] [Rental Duration] ... some more irrelevant columns
For the [Product Code]
column, I need to check if the [Client Name]
has over 3 hours of cummulative [Rental Duration]
on the same day with the same [Product Name]
.
I tried using:
=query($A$3:$O,"select sum(hour(M)+min(M)/60) where Year(J)="& year(J117) & " and Month(J) ="& month(J117)-1 & " and day(J) = " & day(J117) & " ",-1)
But the sum()
function doesn't accept the time duration format or the hour()
function.
I need to use the result of this query as part of a bigger query, where depending on the result I search for a subscription or an other product code.
How can I sum up the time duration in column M?