0
votes

I have a Google Forms data where I only want to perform the past 24 hours of inputs. The formula I am using is:

=ARRAYFORMULA(QUERY('Production Log'!A:A,"Select A where hour(timevalue(now())-timevalue(toDate(A))) <=24"))

But I am getting this error:

Error Unable to parse query string for Function QUERY parameter 2: PARSE_ERROR: Encountered " "hour" "hour "" at line 1, column 16. Was expecting one of: "(" ... "(" ...

2
share a copy of your sheet with example of desired outputplayer0

2 Answers

1
votes

Filter may be simpler:

=filter('Production Log'!A:A,(now() - ('Production Log'!A:A)) < 1)
1
votes

try:

=QUERY('Production Log'!A:A,
 "select A 
  where A = date '"&TEXT(TODAY()-1, "yyyy-mm-dd")&"'", 0)