You can include date and time personalization in your emails. Date personalization with time references assumes that you entered time-related information in GMT.
Locations to personalize and valid formats
You can manually enter in date personalization fields and redefine the date format in the following areas:
- Email body
- Dynamic content blocks with personalization inside DC content
- Email body that contains external content
- Relational table personalization (RT and database fields)
- SMS message body
- Email header fields
- In email settings
- System Date
- Segment/send hour
Valid values for month are (case-sensitive):
- MMMM (for example, January)
- MMM (for example, Jan)
- M (for example, 1)
Valid values for day are (case-sensitive):
- dd (for example, 02)
- d (for example, 2)
Valid values for year are (case-sensitive):
- yyyy (for example, 1999)
- yy (for example, 99)
- 2014-02-28 HH:mm:ss (hour in a day 0 - 23)
- 2014-02-28 hh:mm a (hour in am/pm)
- 02-28-2014 HH:mm
- 02-28-2014 HH:mm zzz (for example, GMT)
- 02-28-2014 HH:mm zzzz (for example, Greenwich Mean Time)
- 2014/07/24 12:00:00 AM
- Jan 24, 2014 14:00
- January 24, 2014 13:00:00
Valid numeric values - supported characters are as follows:
- 0 = A digit- always displayed
- # = A digit, leading zeros are omitted
- . = marks a decimal separator
- , = marks a grouping separator (for example, thousand separator)
- #,###.00 (for example, 1,000,000.63)
Show the dd/MMM/YYY date format in an email
In the following example, the following two fields are in the database:
- A date field that is called Birthday. In this example, the field contains the value "10/10/1980".
- A text field that is called DateFormatString. This field defines the format of ANY date field.
- Click Data > Contact lists.
- Open the contact's Edit Contact page.
- In the Date Format String field, type
- Save the Edit Contact page.
- In the email body, type
- Save the email.
The two fields, Birthday and DateFormatString, are combined to show the birthday date as defined in the DateFormatString field:
The following options do not work in tandem with language or locale. Instead, you can create dynamic content to use this feature with a language or country data field.
Show the yyyy-MMM-dd format in an email
Use the following option when you want to display a particular date format for an existing date database field in an email for all contacts who receive the email. To show the date format as yyyy-MMM-dd, do the following steps:
- Identify the date field, for example, "Birthday".
- In the email body, type this format:
%%format([enter date field name],"yyyy-MMM-dd")%%
- Save the email.
For example, the Birthday field from your database reads as 10/10/1980. You can change the format to:
Now, all birthday dates shown in the email are in the
Use this option when you want to display a certain format for a specific contact. For example, you might want to show someone's birthday specific to the country they are living in, instead of how their birthday was entered into the Birthday field in the database.
The following examples show how to add formatting to the email body by using the following format structure:
%%format([enter date field name],"[enter the combination of year, date, and month]")%%
%%format([enter date field name],"yyyy")%%
%%format([enter date field name]_ISO)%%
Use one of the following formats:
copyright%%format([enter date field name],"yyyy")%%
©%%format([enter date field name],"yyyy")%%
Dynamically add a send date
You can dynamically add a send date to the email body by using the
%%MAILING_SEND_DATE%% personalization tag. You can either manually type in the tag or select it from the Insert Personalization menu in the content builder.