0

In Google Sheets I have a QUERY where I want to import only those rows where the dates in Col23 are on or before today's date.

This is my current formula:

=QUERY(
   IMPORTRANGE(
     "1PfXYlqZ6UBbhemljYDMKUJvQJlRY6aTTVz825yHPrPk","Jan!A1:W"),
   "SELECT Col2,Col3,Col4,Col5,Col14,Col15,Col16,Col22,Col23 where Col16
    contains 'Sent' and Col23 = date '"&text(today(),"yyyy-mm-dd")&"'")

1 Answer 1

1

To get rows where a date is less than or equal to today in a query(), use the less than or equal to operator <=:

where Col16 contains 'Sent' and Col23 <= date " & text(today(), "'yyyy-MM-dd'")

See the query language help page.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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