Back to Mobile View

Skip to Content

TUAW Deals

Mac Productivity > 10 TextExpander Date Snippets

Mac Productivity  Ten TextExpander Date SnippetsTextExpander (Smile Software) is a utility I use each and every day on my Mac to save time and increase productivity. One of the things I use it for is formatting and inserting dates and times -- adding the date or time to a file or folder name, into an email, a document and so on. In this post, I've shared some of my most used date and time snippets. I hope you find them as useful as I do.

If you're not a TextExpander user, I encourage you to give it a try. You can download a trial version on the Smile Software website. Let me give you a little background on how it works. The concept of TextExpander is simple. You start by creating snippets of text. You then assign abbreviations to those snippets. Whenever you type an abbreviation into any app on your Mac, presto! The corresponding snippet is inserted, replacing the abbreviation you typed. TextExpander also includes some power-user features, such as macros, which let you to insert variable information into your snippets, like dates and times. This is what I'm sharing here -- some of the macros I use for inserting dates.

I've provided a brief description of each snippet, as well as the snippet code (the macro), and the abbreviation I use. Feel free to adjust accordingly to meet your own needs.

1. Current Date -- Long: This snippet actually comes with TextExpander as an example. It's used to insert the current date in Month, D, YYYY format, i.e. January 9, 2013. I consider this a long date, and changed the abbreviation, so as not to conflict with my other snippets.

Mac Productivity  Ten TextExpander Date Snippets

Snippet: %B %e, %Y
Abbreviation: CDATEL

2. Current Date -- Short: This snippet inserts the current date in YYYY-DD-MM format, i.e. 2013-01-09. This is a good format to use when applying dates to file and folder names, as it allows them to be sorted by year, month and day.

Snippet: %Y-%m-%d
Abbreviation: CDATES

3. Current Time - Long - This snippet inserts the current time in H:M:SS AM/PM format, i.e. 10:00:00 AM. While this format is good for inserting into emails or documents, it's not so good to use on file or folder names, due to its use of colons.

Snippet: %1I:%M:%S %p
Abbreviation: CTIMEL

4. Current Time -- Short: This snippet inserts the current time in HH-MM-SS format, i.e. 10-00-00. This is a good format to use when applying times to file and folder names, as it doesn't contain any colons. It also uses 24-hour time, in order to avoid potential file name conflicts.

Snippet: %H-%M-%S
Abbreviation: CTIMES

5. Month and Year: This snippet inserts the current month and year, in Month YYYY format, i.e. January 2013. I often need to reference the current month in this manner when writing emails.

Snippet: %B %Y
Abbreviation: MDATE

6. Yesterday: The following snippet subtracts one day from the current date and inserts it in YYYY-MM-DD format, i.e. 2013-01-08.

Snippet: %@-1D%Y-%m-%d
Abbreviation: YDATE

7. Tomorrow: The following snippet adds one day to the current date, and inserts it in YYYY-MM-DD format, i.e. 2013-01-10.

Snippet: %@+1D%Y-%m-%d
Abbreviation: TDATE

8. Future Date: The following snippet can be customized to add a specified number of days to the current date, in YYYY-DD-MM format. I have several versions of this snippet for two, three and four days in the future.

Snippet: %@+(INSERT NUMBER OF DAYS HERE)D%Y-%m-%dd
Abbreviation: FDATE(NUMBER OF DAYS)

I.e. For two days in the future:

Snippet: %@+2D%Y-%m-%dd
Abbreviation: FDATE2

9. Next Sunday: I often need to refer to next Sunday in emails, invoices and so on in YYYY-MM-DD format. This goes beyond what TextExpander's built-in macros can do, so I resort to AppleScript. Just set the content type of your snippet to AppleScript, and paste in the following code:

Mac Productivity  10 TextExpander Date Snippets

Snippet:

Abbreviation: NEXTSUN

10. Current Week Range: I also sometimes need to insert a range of dates representing the current week. Again, this goes beyond the capabilities of TextExpander's build-in macros, so I use AppleScript. Again, set the content type to AppleScript, and paste in the following:

Mac Productivity  Ten TextExpander Date Snippets

Snippet:

Abbreviation: CWEEK

© 2014 AOL Inc. All Rights Reserved.