0

This question already has an answer here:


Query works fine if I change Hudson F to Automatic, if I change it to date it stops working. I need to view F as date and have the query work

=QUERY(Hudson2000!1:6634, "SELECT A, B, C, D, F, G WHERE F >= "&A2&" AND F <= "&B2)

marked as duplicate by Rubén, Community Oct 4 '18 at 16:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0

The problem occurs because Google Sheet cells and QUERY data type are the same.

Instead of A2 and F2 use TEXT(A2,"YYYY-MM-DD") and TEXT(F2,"YYYY-MM-DD") and enclosed inside date 'xxxx' where xxxx is the place for the date.

The resulting formula is the following:

=QUERY(Hudson2000!1:6634, "SELECT A, B, C, D, F, G WHERE F >= date '"&TEXT(A2,"YYYY-MM-DD")&"' AND F <= date '"&TEXT(F2,"YYYY-MM-DD")&"'")

  • Thank you for your help but for some reason its still now working. Can i share the file with you somehow to take a closer look? – Pierre Jean Jouve Oct 4 '18 at 16:43
  • I got it working with your query, just had to change the F2 to B2. Thank you very much for all your help. – Pierre Jean Jouve Oct 4 '18 at 16:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.