Table of Contents
The process of filtering Google Sheets Query results by a specific date range involves using the built-in date filters within the QUERY function. This allows for the selection of a specific date range, which can be further refined by using operators such as greater than or less than. By applying these filters, the user can easily extract and analyze data within a specific timeframe, providing a more targeted and accurate result. This functionality is especially useful for businesses and individuals who need to track and analyze data based on specific time periods.
Google Sheets Query: Filter by Date Range
You can use the following formula to filter by a date range in a Google Sheets query:
=QUERY(A1:C9,"select * where A > date '"&TEXT(DATEVALUE("1/1/2020"),"yyyy-mm-dd")&"'")
This particular formula returns all rows in the range A1:C9 where the date is after 1/1/2020.
The following examples show how to use this formula in practice with the following dataset:

Example 1: Filter Rows Before Some Date
We can use the following formula to filter for rows where the date is before 1/10/2020:
=QUERY(A1:C17,"select * where A < date '"&TEXT(DATEVALUE("1/10/2020"),"yyyy-mm-dd")&"'")

Notice that only the rows where the date is before 1/10/2020 are returned.
Example 2: Filter Rows After Some Date
We can use the following formula to filter for rows where the date is after 1/10/2020:
=QUERY(A1:C17,"select * where A > date '"&TEXT(DATEVALUE("1/10/2020"),"yyyy-mm-dd")&"'")

Notice that only the rows where the date is after 1/10/2020 are returned.
Example 3: Filter Rows Between Two Dates
We can use the following formula to filter for rows where the date is between 1/5/2020 and 1/15/2020:
=QUERY(A1:C17,"select * where A > date '"&TEXT(DATEVALUE("1/5/2020"),"yyyy-mm-dd")&"'and A < date '"&TEXT(DATEVALUE("1/15/2020"),"yyyy-mm-dd")&"'")

Notice that only the rows where the date is between 1/5/2020 and 1/15/2020 are returned.
Additional Resources
The following tutorials explain how to perform other common operations with dates in Google Sheets:
Cite this article
stats writer (2024). How do I filter Google Sheets Query results by a specific date range?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-do-i-filter-google-sheets-query-results-by-a-specific-date-range/
stats writer. "How do I filter Google Sheets Query results by a specific date range?." PSYCHOLOGICAL SCALES, 2 Jul. 2024, https://scales.arabpsychology.com/stats/how-do-i-filter-google-sheets-query-results-by-a-specific-date-range/.
stats writer. "How do I filter Google Sheets Query results by a specific date range?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-do-i-filter-google-sheets-query-results-by-a-specific-date-range/.
stats writer (2024) 'How do I filter Google Sheets Query results by a specific date range?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-do-i-filter-google-sheets-query-results-by-a-specific-date-range/.
[1] stats writer, "How do I filter Google Sheets Query results by a specific date range?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, July, 2024.
stats writer. How do I filter Google Sheets Query results by a specific date range?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.
