How to Search Gmail by Date Range (before:, after:, older_than:)

The short answer
To search Gmail between two dates, use after: and before: with dates in YYYY/MM/DD format — for example, after:2025/12/31 before:2026/02/01 returns all mail from January 2026. Both operators are exclusive at the boundary. For recurring searches, older_than: and newer_than: take relative spans like 30d or 1y.
Search Gmail by date range using before:, after:, older_than: and newer_than:. Includes format, combining operators, and why results can shift by a day.
On this page
- 01What do you need to know before searching Gmail by date?
- 02How do you search Gmail by date range, step by step?
- 03Does Gmail date search work the same on mobile and desktop?
- 04What to do when Gmail date search is off or returns nothing
- 05Gmail date operators at a glance
- 06A faster way: find emails by time without remembering the format
Knowing how to search Gmail by date range is one of the most useful skills you can pick up in Gmail, and one of the first places people run into a wall. The search box accepts four date operators — before:, after:, older_than:, and newer_than: — but the format is strict. A stray dash instead of a slash, a space after the colon, or a boundary that lands one day short of what you intended makes the query silently return the wrong results or nothing at all. This guide covers the correct syntax, when to use each operator, how to combine them for a precise window, and what to do when the results are off.
The short answer for the most common case: type after:2025/12/31 before:2026/02/01 to find all mail sent in January 2026. Dates go in YYYY/MM/DD format with slashes. Both boundaries are exclusive — January 1 itself is not captured by before:2026/01/01 — so when you want a full calendar month you step the dates one day outside each edge. For searches you run repeatedly, older_than:1y or newer_than:30d are easier because the window shifts with today's date automatically.
What do you need to know before searching Gmail by date?#
Four rules govern every date search in Gmail, and breaking any one of them produces a query that looks right but does not filter by date at all.
The format is YYYY/MM/DD — year, then month, then day, separated by slashes, not dashes. before:2026-01-01 looks reasonable but Gmail treats it as a plain-text search for the string '2026-01-01', not a date filter. before:2026/01/01 works correctly. There is also no space allowed between the operator name and the value: before: 2026/01/01 fails; before:2026/01/01 succeeds.
Both before: and after: are exclusive at the boundary. A message that arrived on January 1, 2026 is not returned by before:2026/01/01, and it is also not returned by after:2025/12/31 — it falls exactly on the edge of both. To capture the entire month of January 2026, you need after:2025/12/31 before:2026/02/01. The same logic applies to any window you set: set the after: date to the day before your window opens, and the before: date to the day after it closes.
You also have two families of operators, and they serve different purposes. Absolute operators — before: and after:, and their aliases older: and newer: — pin a specific calendar date. They are right when you remember a fixed event: a contract deadline, a project kick-off, the quarter when something changed. Relative operators — older_than: and newer_than: — define a span from today using a number and a unit (d for days, m for months, y for years). They are right for recurring searches: older_than:1y always means more than a year ago from whenever you run it, so you never have to update the date.
Slashes not dashes — and no space after the colon
How do you search Gmail by date range, step by step?#
- 1
Open the search box
Click the search bar at the top of Gmail, or press the / key to jump there from anywhere in the interface. On mobile, tap the search icon at the top of the screen.
- 2
Type your after: date to set the start of the window
Use after:YYYY/MM/DD with the day before the period you want. For mail from January 2026, type after:2025/12/31. Because the operator is exclusive, this captures everything from January 1 onward without including December 31.
- 3
Add a before: date to close the window
Separated by a space, type before:YYYY/MM/DD. For January 2026, the full query is after:2025/12/31 before:2026/02/01. The space between the two operators is an implicit AND — Gmail requires both conditions to match, so only mail within the window appears.
- 4
Stack other operators to narrow further
Any Gmail operator works on the same line. from:[email protected] after:2025/12/31 before:2026/02/01 has:attachment limits results to attachments from your accountant during January 2026. Build incrementally: add one operator at a time and watch the result count drop.
- 5
Switch to older_than: or newer_than: for relative spans
If you do not need a fixed window, relative operators are simpler. newer_than:30d is the past 30 days from today. older_than:6m newer_than:1y is the slice between six months and one year ago. The units are d (days), m (months), and y (years). These searches stay accurate whenever you run them without you having to update a date.
Does Gmail date search work the same on mobile and desktop?#
All four date operators — before:, after:, older_than:, newer_than: — work on desktop, the Gmail iOS app, and the Gmail Android app. The typed syntax is identical across platforms. Date chips (the clickable filter buttons that appear under the search bar) are also available on mobile, so you can narrow by date without typing the full format.
The main limitation on mobile is filter creation: you can run a date search on your phone, but you cannot turn that search into a standing filter from the mobile app. Filter management lives in Gmail on the web only.
| Platform | Typed date operators | Date chips | Create filter from search |
|---|---|---|---|
| Gmail on the web | Yes — full syntax | Yes — opens a date picker | Yes |
| Gmail iOS app | Yes — same syntax | Yes — after first search | No |
| Gmail Android app | Yes — same syntax | Yes — after first search | No |
| Mobile browser (gmail.google.com) | Yes | Partial | Yes — request desktop site |
What to do when Gmail date search is off or returns nothing#
When a date search returns the wrong messages, misses something you know exists, or appears to be off by exactly one day, the cause is almost always one of a small set of problems. The table below maps each symptom to its fix.
The off-by-one case deserves a longer explanation because it surprises people who have the format exactly right. Gmail interprets the before:/after: boundary at midnight in your account time zone. If a message arrived late at night on a date and your time zone is behind UTC, the message can appear to Gmail as having arrived on the next calendar day — placing it outside a before: boundary you set on the same date. The fix is to widen the window by one day on each side. This is an inherent behavior of how Gmail timestamps messages, not a bug you can configure away.

| Symptom | Likely cause | Fix |
|---|---|---|
| Results seem off by one day | Gmail applies boundaries at midnight in your account time zone; near-midnight messages land on the adjacent date | Widen the window by one day on each side of the range you care about |
| Search returns nothing | Dashes used instead of slashes: 2026-01-01 instead of 2026/01/01 | Rewrite with slashes: before:2026/01/01 |
| Date operator ignored, full inbox returned | Space after the colon: before: 2026/01/01 is a keyword search, not a date filter | Remove the space: before:2026/01/01 |
| A known message does not appear | It is in Spam or Trash, which Gmail excludes from all searches by default | Add in:anywhere — for example, in:anywhere after:2025/12/31 before:2026/02/01 |
| older_than: or newer_than: not filtering | Wrong unit spelling — only d, m, and y are valid, not day/month/year | Use older_than:30d not older_than:30days |
Gmail date operators at a glance#
Here is a single reference table covering every date operator Gmail supports, including the two aliases (older: and newer:) that behave identically to before: and after: and exist mainly for historical compatibility.
| Operator | Format | Boundary | Example | Returns |
|---|---|---|---|---|
| before: | YYYY/MM/DD | Exclusive | before:2026/01/01 | Mail sent before Jan 1, 2026 |
| after: | YYYY/MM/DD | Exclusive | after:2025/12/31 | Mail sent after Dec 31, 2025 |
| older: | YYYY/MM/DD | Exclusive (alias for before:) | older:2024/06/01 | Same as before: — sent before the date |
| newer: | YYYY/MM/DD | Exclusive (alias for after:) | newer:2024/06/01 | Same as after: — sent after the date |
| older_than: | N + d / m / y | Relative from today | older_than:1y | More than 1 year old from today |
| newer_than: | N + d / m / y | Relative from today | newer_than:30d | Within the last 30 days |
| Window (combined) | after: + before: | Both exclusive | after:2025/12/31 before:2026/02/01 | January 2026 mail only |
Use relative dates for repeating searches
A faster way: find emails by time without remembering the format#
Date operators solve the problem when you know the format, the boundaries are easy to calculate, and all your mail lives in one Gmail account. When those conditions do not hold — when you have mail scattered across Gmail, Outlook, and another provider, or when you want to describe what you remember rather than translate it into YYYY/MM/DD arithmetic — the operator approach creates friction it does not have to.
AI Emaily is an AI-native email client with semantic search built in. Instead of typing before:2025/12/31 after:2025/09/30, you describe what you are looking for in plain language: 'the invoice from my accountant around Q4 last year' or 'anything about the contract signed before the deadline.' It surfaces the right message by meaning, not by matching a literal date string, so there is no format to remember and no boundary to step by a day. Smart search across your whole account works the same way.
For even broader queries, Ask AI lets you ask a question about your mail in plain English and get an answer drawn from across every account you have connected — Gmail, Outlook, Yahoo, iCloud, any IMAP mailbox — in a single search rather than opening each inbox separately. We build AI Emaily. If date-operator syntax is friction you would rather skip, you can try it at aiemaily.com or review the plans at aiemaily.com/pricing. A 7-day free trial is included; no charge if you cancel before day seven.
Frequently asked
See it in AI Emaily
Keep reading

Written by
Nafiul HasanNafiul Hasan is an entrepreneur and AI automation system builder with 10+ years of experience turning messy, manual workflows into reliable automated systems. He designs and ships AI enterprise solutions end-to-end — the agent logic, the data plumbing, and the product people actually use — and founded AI Emaily to give busy professionals their attention back. He writes here from the builder's seat: what works, what breaks, and how to put AI to work without giving up control.