Find Files by Date in Spotlight Search on Mac
In this article
To find files by date using Spotlight on a Mac, open Spotlight with Command (⌘) + Space and type a date-based search operator such as date:today, date:yesterday, or date:this week followed by your search term (e.g., report date:this week). Spotlight then filters results to files matching that date range, and you can refine further with additional operators like kind: or name:.
Why Spotlight Date Search Matters
Spotlight is Apple's built-in search engine for macOS, indexing your entire drive so you can locate files, emails, contacts, and more in seconds. Date-based searching is especially useful when you remember when you worked on a document but not its name or location. Instead of scrolling through Finder folders or guessing, Spotlight's date operators narrow results to a specific day, week, or month, saving time and reducing frustration.
How Spotlight Date Search Works
Spotlight uses metadata (data about data) stored in its index. Every file has attributes like creation date, last modified date, and last opened date. When you type a date operator, Spotlight compares those attributes to the date you specify. The key operators are:
date:today– files modified todaydate:yesterday– files modified yesterdaydate:this week– files modified within the current week (starting Sunday)date:this month– files modified within the current calendar monthdate:this year– files modified within the current yeardate:last week– files modified in the previous calendar weekdate:last month– files modified in the previous calendar monthdate:last year– files modified in the previous calendar yeardate:<date>– files modified on a specific date (e.g.,date:2023-05-15)date:<start>-<end>– files modified between two dates (e.g.,date:2023-01-01-2023-01-31)
These operators apply to the last modified date by default. To search by creation date, use created: instead (e.g., created:yesterday). To search by last opened date, use last opened: (e.g., last opened:this week).
How to Use Date Operators in Spotlight
Follow these steps to perform a date-based search:
- Press Command (⌘) + Space to open Spotlight.
- Type your search term (e.g.,
budget). - Add a date operator (e.g.,
budget date:this month). - Press Return to see results, or click “Show All in Finder” to open the full list in a Finder window.
You can combine multiple operators for more precision. For example, invoice kind:pdf date:last month finds PDF invoices from the previous month. Use name: to match part of the filename (e.g., name:report date:yesterday).
Common Problems and How to Fix Them
If Spotlight returns no results or outdated results, the index may be incomplete or corrupted. Here are typical issues and solutions:
- No results at all: Check your spelling and try a broader date range (e.g.,
date:this yearinstead ofdate:today). If still nothing, the file may not be indexed (e.g., on an external drive that's disconnected). - Results are old: Spotlight may not have re-indexed after a file change. Wait a few minutes or force a re-index by adding the drive to System Settings > Spotlight > Privacy, then removing it.
- Date operator not working: Ensure you're using the correct syntax—no spaces between
date:and the value. Also, use hyphens for specific dates (YYYY-MM-DD), not slashes. - Files on external drives: Spotlight indexes external drives only if they're connected and indexing is enabled for them. Check System Settings > Spotlight > Search Results.
Alternatives to Spotlight for Date Search
If Spotlight isn't meeting your needs, try these built-in alternatives:
- Finder Search: Open a Finder window, press Command + F, then click the “+” button to add a search condition. Choose “Last modified date” from the dropdown and set a range (e.g., “within last 7 days”). This gives a visual interface for date filtering.
- Smart Folders: Save a Finder search as a Smart Folder (File > New Smart Folder) so you can quickly access files matching a date rule later.
- Terminal command: Use
mdfindin Terminal for more advanced queries, e.g.,mdfind 'kMDItemFSName == "*.pdf" && kMDItemLastUsedDate > $time.today(-7)'. This requires some familiarity with the command line.
Costs and Safety
Spotlight is free and built into macOS; there are no hidden costs. Using date operators is safe—you're only querying the index, not modifying files. However, be aware that Spotlight doesn't index the content of all file types (e.g., some encrypted files or files in hidden folders). For sensitive data, ensure your Mac's FileVault is enabled to protect the index and files at rest.
Frequently Asked Questions
How do I search by creation date in Spotlight?
Use the created: operator instead of date:. For example, created:yesterday finds files created yesterday. The date: operator always refers to the last modified date.
Can I search for files modified between two specific dates?
Yes, use a range with a hyphen: date:2023-01-01-2023-01-31 finds files modified in January 2023. Make sure the start date is earlier than the end date.
Why doesn't Spotlight find files on my external hard drive?
Spotlight may not index external drives by default. Go to System Settings > Spotlight > Search Results, and ensure “External Drives” is checked. Also, the drive must be connected and mounted.
Can I use natural language like “last Tuesday”?
Spotlight doesn't support natural language for dates. Use date:last week or specify an exact date with date:YYYY-MM-DD.
Does Spotlight search inside file contents with date operators?
Yes, Spotlight searches file contents and metadata simultaneously. The date operator filters the results, but the content search still applies. For example, budget date:today finds files containing “budget” that were modified today.