How to search Gmail by date

Four operators cover every version of this job. Here they are, with copyable queries, the boundary problem that makes a correct search look broken, and what to do with the pile of old mail you turn up.

Short version: type after:2026/01/01 before:2026/02/01 in Gmail's search box and press Enter. That returns January 2026. Use the four-digit-year YYYY/MM/DD format, and use both operators together rather than one, because a two-sided range is the only kind you can sanity-check by reading it.

I'm Alec. I founded Gmail Unsubscribe, and around 20,000 people use it in Gmail today. Most people who search by date are doing one of two things: hunting a single receipt from months ago, or scoping a cleanup before deleting a few thousand messages. The operators are the same. The care you take afterwards is not, so this page covers both.

The two operators that do most of the work

after: and before: take a fixed calendar date. Everything else is a variation on them.

QueryWhat it returns
after:2026/01/01Everything received after January 1, 2026
before:2026/01/01Everything received before January 1, 2026
after:2026/01/01 before:2026/02/01January 2026 and nothing either side of it

Gmail accepts a couple of other date formats, but stick to YYYY/MM/DD. It reads unambiguously, it sorts correctly if you save queries in a notes file, and it removes the day-month ordering question entirely.

One thing worth knowing up front: before: and after: are exclusive at the edges and Gmail resolves them against the message timestamp in your account's time zone. A message that arrived at 11:40pm on the 31st can land on either side of a boundary depending on where it was sent from. That is not a bug in your query, and the fix is a wider window rather than a more precise one.

Queries you can copy

Change the dates and the sender. These are the shapes that come up over and over.

  • after:2026/06/14 before:2026/06/16 finds mail from around June 15. The one-day pad on each side is deliberate.
  • after:2025/01/01 before:2026/01/01 is all of 2025.
  • from:store.example after:2026/01/01 is one sender since a date.
  • subject:receipt after:2026/01/01 finds receipts by subject line since a date.
  • in:anywhere after:2026/03/01 before:2026/03/08 adds Spam and Trash to that week, which a plain search leaves out.
  • has:attachment before:2024/01/01 larger:10M is the query for reclaiming storage.

Date operators combine with every other Gmail operator, and combining is what makes them useful. from:store.example older_than:6m tells you something. Searching for the word "store" tells you very little.

older_than: and newer_than: for cleanup you repeat

Fixed dates are for an audit. Rolling ages are for a routine, because the same query means something different each month you run it.

  • older_than:1y is anything more than a year old.
  • older_than:6m is anything more than six months old.
  • newer_than:30d is the last month.
  • newer_than:7d from:me is what you sent this week.

The units are d, m, and y. There is no week unit, so seven days is 7d.

Where this earns its keep is a monthly pass: category:promotions older_than:6m shows every marketing message that has been sitting there half a year. Run it, look at the sender column rather than the subjects, and you will usually recognize the same dozen names. Those names are the actual problem, not the messages.

What rolling ages cannot do is name a calendar month. If you need January specifically, use fixed dates.

If you would rather not type operators

Gmail's advanced search does the same thing with fields. On the web, click the sliders icon at the right of the search box.

  1. Fill in whatever you remember: sender, subject, or a word in the body.
  2. Set the date field. You get a date plus a window around it, such as 1 day or 1 month, rather than a free range.
  3. Set the search location if the message might be in Spam or Trash. This is the field people miss.
  4. Click Search.

Gmail then writes the operator query into the search box for you, which is a decent way to learn the syntax. The menu is slower for anything you run more than once, and it cannot express a precise two-sided range as cleanly as typing after: and before: yourself.

When a date search returns nothing

Work down this list before you widen the search and start guessing.

  1. Check the format. Four-digit year, slashes, 2026/07/01. A two-digit year is the most common cause of an empty result.
  2. Take the date operators off. Search for the sender alone. If that finds nothing either, the problem is not the date.
  3. Search in:anywhere. A normal Gmail search skips Spam and Trash. If the message was filtered or deleted, only in:anywhere sees it.
  4. Widen by a day on each side. If after:2026/01/01 before:2026/01/02 is empty, try after:2025/12/31 before:2026/01/03. That is the time zone boundary, not a missing message.
  5. Remember the 30-day clock. Gmail deletes Spam and Trash permanently after 30 days. A date search cannot recover something that is already gone, which is covered in how to check junk mail in Gmail.

What to do with the old mail a date search finds

This is where the searching stops and the judgment starts. A date range is a blunt instrument. It has no idea which of those 4,000 messages is a tax document.

  1. Sort by sender, not by date. Once the search is running, scan the From column. Old mail is usually 15 senders repeated hundreds of times, not hundreds of separate decisions.
  2. Archive anything with a record in it. Receipts, order confirmations, travel, tax, anything account related. Archiving keeps it searchable and takes it out of the inbox. It still uses storage, which is why deleting archived emails is its own job.
  3. Delete the marketing blasts. A four-year-old sale email has no value. Mass delete in Gmail walks through doing that safely with Select all.
  4. Unsubscribe from the senders behind it. Deleting 4,000 messages does nothing about the 4,001st. The list is still live.

Step four is the one people skip, and it's the only one that changes next month. A date search is a good way to find your worst offenders, because the sender that appears 300 times in older_than:1y is the sender still mailing you today.

Our extension does the sender-side half of this. It scans your inbox, shows you every subscription sender in one list, and unsubscribes through each sender's official mechanism. Free covers unlimited scans and archiving plus 5 unsubscribes a month. Pro is $35.88 a year for unlimited.

Add to Chrome, free

Worth saying plainly, since we sell one of these: no unsubscribe tool clears every list. We measured it across real requests, and roughly a third of unsubscribe attempts hit senders that offer no working mechanism at all. No RFC 8058 header, no working link, nothing. We report those back to you as failures instead of marking them done. For that third, blocking and reporting are the finish, which how to block unwanted emails covers.

When not to act on a date range

Some searches should end with reading, not with Select all.

  • Anything financial, medical, or legal. Archive the range, do not delete it.
  • A range you have not scrolled. Check the last page of results, not just the first, before any bulk action.
  • A search that mixes categories. before:2024/01/01 on its own catches receipts and newsletters equally. Add category:promotions or a sender before you delete.

The safe pattern is to narrow with a second operator until every result on screen is the same kind of thing, then act. Deleting mail in Gmail is reversible for 30 days and permanent after that.

Common questions

How do I search Gmail after a date?

Type after:2026/01/01 and press Enter. Four-digit year, YYYY/MM/DD. Add from: or subject: to narrow it.

How do I search Gmail between two dates?

Put both operators in one query: after:2026/01/01 before:2026/02/01. That is January with nothing either side.

Why is my date search returning nothing?

Check the year has four digits, drop the date operators to test the rest of the query, add in:anywhere in case it was archived or filtered, and widen the range by a day on each side for the time zone edge.

What is the difference between before: and older_than:?

before: is a fixed calendar date and always means the same thing. older_than:6m is rolling and returns a different set every time you run it. Fixed for audits, rolling for routines.

Does a date search include archived mail?

Yes. It covers All Mail, which includes archived conversations. It skips Spam and Trash, so add in:anywhere when a message might be in either.