|
How can I search Google Gmail messages within a date range?I have a ton of email in my Gmail archive, and sometimes need to dig through older email. Problem is, if I do a search, it shows me all the most recent matches first when what I really want to do is, say, search for messages more than a year old, or 12-18 months ago or similar. Is there any way to do a more sophisticated search than just by keyword? I'm a big fan of Google's Gmail service, and have found that experimentation is a great thing in terms of its search, just as poking around and trying different things in Google's main search system can real all sorts of useful capabilities, including the ability to convert measurement and weight units and the ability to solve even fairly complicated formulas. In Gmail, as with many Google properties, the real secret is to pay attention to the small print (does that sound like something your Dad might have told you when you were younger? :-) For example, when you're in Gmail, here's what you see in the search area: Look closely. See the link "Show search options"? Click it: ![]() That's pretty interesting, isn't it? :-) Now let's poke around a bit. If I do a search for "contract" on email that's between one and two years old (which is done, rather awkwardly, as being within six months of 18 months ago), the resultant URL is: https://mail.google.com/mail/#advanced-search/subset=all&has=contract&within=6m&date=18+months+ago
So we can see that Gmail uses a different sort of URL notation for advanced searches with "#advanced-search/subset=all". The keyword is in the "has=" value, and then there's a "date=" and a "within=". The question is, can we use those as predicates directly in a search? I'll try it, searching for "contract within:6m date:01/01/2008". The result? Zero. Ah, well, okay, so that doesn't work. But what does? Turns out that with a big of digging, Google has an advanced search help page that details the following long list of predicates:
There are many more entries (see the original Google article) but these are the key ones that most power users are going to focus upon. This also gives us the tools we need to do the search we really want to do: "contract before:2008/06/01 after:2007/06/01" That, finally, gives us all email that contains the word "contract" and was sent or received between June 1, 2007 and June 1, 2008. All messages more than a year old? Just use "before:" and follow it with the previous year and current month and day. As I write this, it'd be "2008/06/21". Sometimes experimentation fails, as we saw with my first stab, but exploring the help menus and everything else definitely reveals that the Gmail search system has quite a bit more power than is immediately obvious, and quite a bit more power than even you get with the 'advanced search' pane.
Categorized:
Computer and Internet Basics
(Article 8948,
Written by Dave Taylor)
Tagged: email archives, gmail, gmail searching, google mail Previous: How do I work with Voice Memos on my Apple iPhone? Next: Can I use Apple Time Machine to restore to a new MacBook? Subscribe!
The before: and after: search tags would appear to only apply to the date the mail was received in GMail... not when it was sent.... :( Posted by: Grrr Power at October 4, 2010 2:24 PMI have something to say, now that you mention it, but ...
I do have a comment, now that you mention it!
|
Recommended
Recent Entries
Search
I Need Help!
Apple iPad Help
Articles and Reviews Auctions and Online Shopping Blogs and RSS Feeds Building Web Site Traffic Business and Management CGI Scripts and Web Site Programming Computer and Internet Basics d) None of the Above Facebook Help Google Plus Help HTML and CSS Industry News and Trade Shows iPhone and Cell Phone Help iPod, Sony PSP and MP3 Player Help Mac OS X Help Pay Per Click (PPC) Advertising Search Engine Optimization (SEO) Shell Script Programming Tech Support Video Help The Writing Business Twitter, LinkedIn and Social Network Help Unix and Linux Help Video Game Tips and Help Windows PC Help WordPress Help |