Instead of date 'TODAY()' use date '"&TEXT(TODAY(), "yyyy-mm-dd")&"'" NOTES: - The last `"` should be placed in a proper place in order to have a text value as the second argument of QUERY. - `'TODAY()'` doesn't returns Today's date, it returns a string with the word TODAY followed by parenthesis. Try this =ARRAYFORMULA(QUERY({A3:H, HOUR(A3:A)}, "select Col7,sum(Col3),sum(Col5),sum(Col8) where Col1 is not null and Col9=7 and Col1 = '"&TEXT(TODAY(), "yyyy-mm-dd")&"' and Col1 = '"&TEXT(TODAY() + 1, "yyyy-mm-dd")&"' group by Col7 label sum(Col3)'',sum(Col5)'',sum(Col8)''", 0)) Related - https://webapps.stackexchange.com/q/74117/88163 - https://webapps.stackexchange.com/q/94724/88163 - https://webapps.stackexchange.com/q/132616/88163