Format Date and Time
By default, data format will follow the end-user's default locale or from their personal setting in Salesforce. The format can be changed throughout the document by editing the Default Data Formatter in template Settings.
In the Document tab -> Formats

Click on the format you want to customize
Adjust the format settings as needed

Using available pattern
In the Pattern Editor, select the pattern you want to use
Click Test to see the example outcome
Click OK

Create your own pattern
You can create your own patter using the symbols in the following table
Type a new pattern in the Edit pattern and click Test or OK
Symbol | Meaning | Example Outcome |
---|---|---|
d or dd | day of the month | 2 or 02 |
M or MM | month of the year | 7 or 07 |
MMM | month of the year (Abbreviated text) | Jul |
MMMM | month of the year (Full text) | July |
yy | year | 17 |
yyyy | year | 2017 |
E | day of the week (Abbreviated text) | SUN |
EEEE | day of the week (Full text) | Sunday |
a | am/pm marker | PM |
HH | hour in day (0-23) | 00 |
hh | hour in am/pm (1-12) | 12 |
kk | hour in day (1-24) | 24 |
mm | minute in hour | 40 |
ss | second in minute | 45 |
zzz | time zone (Abbreviated text) | PST |
zzzz | time zone (Full text) | Pacific Standard Time |
' | escape for text | (none) |
Example patterns for Date and Date Time formatters
Pattern | Example outcome |
---|---|
d MMMM yyyy | 2 July 2017 |
dd-MMM-yyyy | 02-Jul-2017 |
EEEE, d MMMM yyyy | Sunday, 2 July 2017 |
E, dd-MM-yy | SUN, 02-07-17 |
HH:mm | 17:48 |
hh:mm a | 05:48 PM |
MMMM d 'at' hh:mm a | July 2 at 05:48 PM |
You will see the final example how data will be formatted by default in the document. If you want to format a specific field differently than the rest of the document, you can create a Custom Data Formatter and apply that into the template.