This article...
- Explains how Date Codes work in your account and illustrates how they display in the text editors.
- Provides guidance for using Date Codes in templates and messages, including when their use is not appropriate.
- Describes how to insert Date Code placeholders while crafting your message content in the Template Designer and Message Designer text editors.
- Discusses region-specific date formats that have established standards for their date formats.
- Dissects Date Code placeholders and offers cautionary information about manually inputting the codes.
Date Codes in your account
Date Codes are like personalization fields in that, in a template or message, you insert a date "placeholder" that automatically gets populated with the current date when a message is sent. Additionally, the format of the inserted date is based on what you selected when you inserted the placeholder.
You can insert Date Code placeholders in the Text Properties editors in Template Designer and Message Designer, as described in the next section.
Date Code placeholders in the editor field
The following image illustrates how Date Code placeholders display in the text editor:
Date Code usage notes
Before you use Date Codes in your templates and/or messages, it's important to remember that the date placeholder gets populated with the <current_date> at send time.
That is, it will be populated with the <current_date> on the day the message is sent; not the <current_date> of when the placeholder was inserted.
For the same reason, do not use a Date Code placeholder for the date of an event (seminar, conference, etc.) because the date that populates the message will not be what you intended.
NOTE: If you want to indicate any date other than the "message-send" date, do not use a Date Code placeholder. Instead, manually input the appropriate date.
You can use a Date Code to indicate the <current_date>, such as if you want the date on which the message is sent to display in the message header.
EXAMPLE: Assume that you are creating a message in which you want to include the date of an upcoming event (June 29), and you plan to send the message two weeks prior to the event (on June 15).
Do not use a Date Code placeholder for the date of the event (June 29) because the placeholder will auto-populate with the date on which the message is sent (June 15).
TIP: Include the day of the week when inserting dates of events.
Insert a Date Code
You can insert one or more Date Code placeholders into text-based areas of templates and messages.
NOTE: Review the information in Date Code usage notes, above, to understand when to use Date Codes and how to use them properly.
The example in this section details editing an existing message. The same steps apply when you create a message and when you edit and create a template.
To insert a Date Code placeholder:
- In the Admin interface, navigate to Messages > List.
- Select the message that you want to edit and click the Edit button (upper right, above the list).
- On the Design tab, select a text-based content type. The Text Properties panel opens on the left.
- (Optional) Click the double-arrow icon to "float" the editor field.
- In the text editor field, input (type or paste) your message text and place your cursor where you want the date to display. (Be sure to account for spacing between words and to include any necessary punctuation.)
- Click the calendar icon in the toolbar to open the Date Codes selector.
- In the Date Codes selector, click the Language/Region dropdown to make a selection or accept the default, English (USA).
NOTE: The Date Format table below the dropdown displays the format options and an example of how each will display in the message. The Example column displays the month names in the native language of the selected region, as shown below for Canadian French.
- Click the Insert button next to the date format that you want.
The relevant Date Code displays in the editor field.
- When you have finished adding and formatting your text and Date Codes, click Save.
TIP: Review your message text in the Designer canvas and on the Review tab:
Date Format notes
The region that is selected in the dropdown dictates how the date will be formatted when it displays in the sent message.
- The table below lists the Date Formats and the respective Date Code placeholders that display in the text editor for that format.
- The (en-gb) in the examples below reflect the English (UK) region having been selected in the dropdown.
- This parenthetical value is based on which region is selected.
- You can manually input the placeholder codes in the text editor, but be sure to format them exactly as shown below, with:
-
- UPPERCASE letters,
- underscores separating the words,
- the region-specific identifier within the parentheses, and
- the code enclosed within double dollar signs.
Date Format | Placeholder Code |
---|---|
Long Form | $$DATE_LONG_FORM(en-gb)$$ |
Short Form | $$DATE_SHORT_FORM(en-gb)$$ |
Month and Year | $$DATE_MONTH_YEAR(en-gb)$$ |
Year | $$DATE_YEAR(en-gb)$$ |
NOTE: Deviations from this formatting will result in the placeholder code not working as intended and the message, instead, displaying the placeholder code rather than the intended date.