Date Formatting

Date formatting merge tags allow you to customise the display of date fields in email content and subject lines. Use the formatDate  function to format any date field or merge tag according to a specified pattern.

{{formatDate CUSTOMFIELD "YYYY-MM-DD"}}

Available Format Tokens

The following tokens define how parts of a date are displayed. Each token corresponds to a specific date unit.

Year

  • YY  — Two-digit year (e.g., 23)
  • YYYY  — Four-digit year (e.g., 2023)
  • Y  — Expanded year (e.g., 2023, 10000+)

Month

  • M  — Month number (1–12)
  • MM  — Month number with leading zero (01–12)
  • MMM  — Abbreviated month name (Jan–Dec)
  • MMMM  — Full month name (January–December)
  • Mo  — Month number with ordinal suffix (1st, 2nd, etc.)

Day

  • D  — Day of month (1–31)
  • DD  — Day of month with leading zero (01–31)
  • Do  — Day of month with ordinal suffix (1st, 2nd, etc.)
  • DDD  — Day of year (1–365)
  • DDDD  — Day of year with leading zeros (001–365)

Day of Week

  • d  — Numeric weekday (0–6)
  • dd  — Short weekday name (Su, Mo, etc.)
  • ddd  — Abbreviated weekday name (Sun, Mon, etc.)
  • dddd  — Full weekday name (Sunday, Monday, etc.)

Week of Year

  • w  — Week of year (1–53)
  • ww  — Week of year with leading zero (01–53)
  • Wo  — Week with ordinal suffix (1st, 2nd, etc.)

Quarter

  • Q  — Quarter (1–4)
  • Qo  — Quarter with ordinal suffix (1st–4th)

Time Components

  • H , HH  — Hour (24-hour)
  • h , hh  — Hour (12-hour)
  • m , mm  — Minutes
  • s , ss  — Seconds
  • A  — AM/PM uppercase
  • a  — am/pm lowercase

Fractional Seconds

  • S , SS , SSS  — Fractional seconds (tenths to thousandths)

Still need help? Contact Us Contact Us