Formula example

Google Sheets QUERY Date Range

You want to return rows where the Date column is on or after January 1, 2026 and before February 1, 2026.

Copyable formula

Google Sheets formula
=QUERY(A1:D100, "SELECT A, B, C, D WHERE A >= date '2026-01-01' AND A < date '2026-02-01'", 1)

Sample data

DateRegionProductAmount
2026-01-04EastWidget420
2026-01-12WestWidget310
2026-02-03EastGadget275
2026-02-15EastWidget640

Formula explanation

  • QUERY date filters use date literals inside the query string.
  • The upper boundary uses < the next month to avoid time-value edge cases.
  • The final 1 tells QUERY that the source range has one header row.

Common errors

  • Writing dates as 1/1/2026 inside QUERY can fail by locale.
  • Column letters refer to the columns inside the selected range.
  • A mismatched header row count can produce unexpected labels.

Build your own version

Use the deterministic builder for this pattern: Google Sheets QUERY Formula Builder.

Related formulas

FAQ

Why does QUERY require date 'YYYY-MM-DD'?

The query language expects a date literal, not a spreadsheet display format.

Can I use cell references for dates?

Yes, but you need to concatenate text around TEXT(date_cell,"yyyy-mm-dd").