0

I am using Google Sheets query function to bring data from a different sheet. This query works perfectly, matching two text fields (Where A='"&A5&"')

=query('Modifications'!$A$3:$I,"Select E,F,G,H,I Where A='"&A5&"'order by E desc limit 1")

However, when I try to add an AND statement as part of the Where clause to filter by today's date ( now() ), the query returns nothing:

=query('Modifications'!$A$3:$I,"Select E,F,G,H,I Where A='"&A5&"' AND F>now() order by E desc limit 1")

What am I missing?

player0
  • 124,011
  • 12
  • 67
  • 124
quelquecosa
  • 890
  • 1
  • 10
  • 24

1 Answers1

1

try like this:

=QUERY('Modifications'!$A$3:$I, 
 "select E,F,G,H,I 
  where A = '"&A5&"' 
    and F > date '"&TEXT(TODAY(), "yyyy-mm-dd")&"' 
  order by E desc 
  limit 1", 0)
player0
  • 124,011
  • 12
  • 67
  • 124