Quarters and Other Date Formats using Unicode

The standard Date and Time macros in the snippet editor can cover a lot of basic use cases. But if you’re looking for more options or complex formatting, you might be able to get what you’re looking for using the Unicode Date Format macro.

You can find it in the snippet editor under the “Date/Time math” menu, and it allows you to enter a Date Format Pattern to expand date information that the basic macros don’t include, like quarters, timezones, and the week of the year. These are a few format patterns I’ve found useful:

  • “QQQ” to expand the current quarter formatted like Q1, Q2, etc.
  • “zzzz” to expand the local timezone formatted like GMT+01:00

Here’s a reference page that explains Date Format Patterns in more detail, and includes more examples. The Unicode Date Format macro also responds to any date adjustments you make using the other Date/Time math macros. Give it a try next time you’re adding a date to one of your snippets!

8 Likes

Thanks, this is an awesome tip. I’ve added two example Snippets to our Community Snippets Public Group.

  • Expand com.quarter to expand the current quarter. Example: Q1
  • Expand com.timezone to expand your current timezone. Example: GMT-05:00

I love this tip, Jessie. Thanks for sharing! So easy to mess up future date and time otherwise.

1 Like