How do I find/replace by date?

The Find and Replace features allow you to find by a date range. This how-to describes how to find dates and, if you’d like, replace the date with a different format.

  1. Open the Find dialog (Search | Find…).
  2. Change to the Number Range type. By default, the Enter Number Range dialog will pop up.
  3. Change to Date/times. Note that the system default locale will be used for the date format. If the date format in your document is different, you must uncheck Use default date format and choose the correct format.
  4. If the date format is M/d/yyyy, enter 1/1/1900 to Minimum number and 12/31/2100 to Maximum number. If your date format is different, enter the dates in your format.
    Enter Number Range
  5. Click OK. The date range will be added to the Find field.
  6. Click Find Next. A date in your document should be highlighted. This verifies that you entered the correct date format. You can now specify a specific date range if you wish.
    Find

Converting date formats

  1. Open the Replace dialog (Search | Replace…). Change the Find field to the date range that we created before.
  2. In the Replace with field, enter \Dyyyy-MM-dd. You can read about the replacement syntax here.
  3. Click Replace. A matching date should have been converted to the format given by the replacement expression.
    Replace