Skip to main content

Date/Time formatting for date fields in Email & PDF Templates

Yordan Mitrev avatar
Written by Yordan Mitrev
Updated over 3 weeks ago

In R56, we introduced a new way of formatting date fields that would allow you to display dates and timestamps in Emails & PDF templates as desired.

There are 3 main formats available for the date fields in Email and PDF templates:

  1. Date only - system format EU: DD/MM/YYYY or US: MM/DD/YYYY

    1. {{create_date|date}}}}

  2. Longdate - 1 Jan 2000

    1. {{create_date|longdate}}}

  3. Time only - 00:00:00

    1. {{create_date|time}}}

The date shown in the PDF template should take the format the user has selected in their own system.

All of the variables that can be formatted this way can be found in the tables below for Email & PDF templates, respectively.

Email Template

Value

Order Created At (Datetime)

{{order_created}}

Create Date

{{create_date}}

Valid Until (Quote validity)

{{due_date}}

Delivery Date

{{delivery_date}}

Shipping Deadline

{{shipping_deadline}}

Quote Creation Date

{{quote_created_at}}

Production Deadline

{{deadline}}

Quote Created

{{quote_created_at}}

Actual Part Shipping Date (Parcels)

{{actual_part_shipping_date}}

Actual Item Shipping Date (Parcels)

{{actual_item_shipping_date}}

Actual Parcel Shipping Date (Parcels)

{{actual_parcel_shipping_date}}

Invoice Date9 (Invoice module)

{{invoice_date}}

PDF Template

Value

Order Created At (Datetime)

{{order_created}}

Ticket Create Date

{{create_date}}

Valid Until (Quote validity)

{{due_date}}

Delivery Date

{{delivery_date}}

Shipping Deadline

{{shipping_deadline}}

Quote Creation Date

{{quote_created_at}}

Time to Ship (Production module)

{{time_to_ship}}

Production Deadline

{{deadline}}

Actual Part Shipping Date (Parcels)

{{actual_part_shipping_date}}

Actual Item Shipping Date (Parcels)

{{actual_item_shipping_date}}

Actual Parcel Shipping Date (Parcels)

{{actual_parcel_shipping_date}}

Finance Date (Invoice module)

{{finance_date}}

Finance Terms (Invoice module)

{{finance_terms}}

Finance Due Date (Invoice module)

{{finance_due_date}}

Timestamp

{{timestamp}}

There are a few more important points to note when formatting the date fields.

Select Date Formatting

Please keep in mind that there are 2 pages in the Management Console where the date formatting can be selected:

  1. Settings -> Localisation

  2. Settings -> Users -> Edit User


Emails:

  • When an email is triggered via a Workflow rule, the date format is taken from the Localisation page.

  • When the “New Order“ email is automatically sent after the order is created, then the format is taken from the User page.

  • Quote emails are also triggered with the date format from the User page.

PDFs:

  • For a PDF printed from the Order view, the date formatting is taken from the Localisation page.

  • For a PDF printed from the Invoice module, the date formatting is taken from the Localisation page.

Did this answer your question?