Skip to main content

Can I Customize How the Date Displays in My Documents?

Updated this week

Related Questions:

  • Can I control how the date looks for certain merge fields in my documents?

  • Can I hide the day of the week in my dates?

  • Can I change the language of the date in my documents?

Answer:

It is possible to control how the date displays for date Merge Fields in Text Box Elements in your Documents.

By default the dates are displayed in the language of your organizational setting. To adjust language settings see the this article

Example:

default merge field date: Day, Month dd, yyyy

Parse date: 'shortDate'

Parse date 'd MMM - yyyy'

How it looks in the Text Box editor

Use the same method for any other date specific merge fields, for example 'Booking-Start Date' or 'Event-End Date' etc.

Instructions:

To make changes to how your date is displayed, you will need to add a piece to your Date Merge Field in the Text Box editor.

  1. Edit the Text Box containing the Date Merge Field that you want to change

  2. Find the Date Merge Field e.g. {{document.dueDate}}

  3. Add this piece to your Date Merge Field after the text and within the curly brackets:

    1. | parseDate | date:'shortDate'

    2. Replace the bold text between the quotations with your date choices (see options below)

    3. It will look like this: {{document.dueDate | parseDate | date:'shortDate'}}

Date Options:

These options can be combined to control each part of your date:

  • 'yyyy': 4 digit representation of year

  • 'yy': 2 digit representation of year, padded (00-99)

  • 'y': 1 digit representation of year

  • 'MMMM': Month in year (January-December)

  • 'MMM': Month in year (Jan-Dec)

  • 'MM': Month in year, padded (01-12)

  • 'M': Month in year (1-12)

  • 'LLLL': Stand-alone month in year (January-December)

  • 'dd': Day in month, padded (01-31)

  • 'd': Day in month (1-31)

  • 'EEEE': Day in Week,(Sunday-Saturday)

  • 'EEE': Day in Week, (Sun-Sat)

  • 'ww': Week of year, padded (00-53).

  • 'w': Week of year (0-53).

These options are quick alternatives to the default date:

  • 'longDate': equivalent to 'MMMM d, y' for en_US locale (e.g. September 3, 2010)

  • 'mediumDate': equivalent to 'MMM d, y' for en_US locale (e.g. Sep 3, 2010)

  • 'shortDate': equivalent to 'M/d/yy' for en_US locale (e.g. 9/3/10)

⚠️ If you are copying and pasting date formats from this article, please ensure that when pasting you use CTRL+SHIFT+V as this will paste cleanly and not cause any errors with formatting

⚠️ Note that this workaround is not fully supported and may be unreliable

Did this answer your question?