Formula guide · Google Sheets · Updated May 13, 2026

Google Sheets QUERY Date Range

Filter Google Sheets rows by date range with QUERY and the date keyword.

Quick Answer

In QUERY, date comparisons need the date keyword and a yyyy-mm-dd value inside single quotes.

Copyable Formula

=QUERY(A1:D100,"select A, D where A >= date '2026-05-01' and A < date '2026-06-01'",1)

Syntax

=QUERY(A1:D100,"select A, D where A >= date '2026-05-01' and A <= date '2026-05-31'",1)

Google Sheets

Worked Example

AD
DateAmount
2026-05-03120
2026-05-1880
2026-06-02200

Result: Returns May rows by using the first day of May as the lower bound and the first day of June as the upper bound.

Steps

  • Make sure the date column contains real dates.
  • Use date followed by a single-quoted yyyy-mm-dd value.
  • Use < the first day of the next month when timestamps may exist.
  • Format the output after the query if needed.

Common Mistakes

  • Comparing dates as plain text strings.
  • Using local date formats inside the query string.
  • Forgetting to update the upper bound when copying monthly reports.

Excel vs Google Sheets Notes

This page is focused on Google Sheets. Excel may require a different function, pivot table, or Power Query workflow.

Editorial check: This guide was last updated May 13, 2026. Formula behavior can vary by Excel version, Google Sheets rollout, and spreadsheet locale.

FAQ