Use this page when a date, time, number, percentage or currency amount in a generated document is in the wrong format or shows an unexpected value. If fields are blank or show their {{…}} tags, see Merge fields are blank or show their tags instead. For other problems, start with the document didn't generate checklist.
What you'll see
- A date shows as
06/03/2025when your readers expect03/06/2025, or with the time attached. - A date shows the minutes where the month should be, for example
03-47-2025. - A time is several hours early or late, or a date near midnight shows the day before or after.
- A number has no decimals, too many, or the wrong separators (
89,000.02instead of89.000,02). - An amount shows the wrong currency symbol, or no symbol.
Most likely causes
- The merge field has no format switch, so the value appears in a default format.
- The pattern uses the wrong letter case, for example
mm(minutes) instead ofMM(month). - The number pattern doesn't match what you want, for example
#,##0(no decimals). - The locale isn't the one you expect.
\# Currencyformats by locale rather than by a fixed culture. - The time is shown in a different time zone from yours.
How to fix it
Add a format switch
- In your Word template, add
\@and a pattern after date and time fields, for example{{Account.CreatedDate \@ "dd-MM-yyyy"}}. See Date format. - Add
\#and a pattern after number and currency fields, for example{{Account.AnnualRevenue \# $#,##0.00}}. See Currency format. - Upload the template again and generate the document.
Fix the letter case in the pattern
Patterns are case-sensitive:
| You want | Use | Example output |
|---|---|---|
| Day | dd (or d for no leading zero) | 03 (or 3) |
| Month as a number | MM (capitals; mm is minutes) | 06 |
| Short or full month name | MMM, MMMM | Jun, June |
| Year | yyyy | 2025 |
| 12-hour time with AM/PM | hh:mm a | 06:47 PM |
Times only appear if the field is a DateTime field. See Time and AM/PM.
Quotation marks around the pattern are optional: \@ "dd-MM-yyyy" and \@ dd-MM-yyyy give the same result.
Fix decimals and separators
- Choose the pattern for the decimals you need. With 125000,
#,##0gives125,000and$#,##0.00gives$125,000.00. See Format numbers. - For another country's separators, add
NumberCulture1with a culture code as an Other Parameter on the solution's Assign Behaviors page, for exampleNumberCulture1=nl-NL. Then use{{Opportunity.Amount \# NumberCulture1}}: 89000.02 becomes89.000,02. See NumberCulture. - For percentages, use
\# ##%, for example{{Probability \# ##%}}. See Show percentages.
Fix the currency symbol
- Add
CurrencyCulture1with a culture code as an Other Parameter, for exampleCurrencyCulture1=de-DE. The amount is formatted the way that locale writes it: withCurrencyCulture1=en-US, 10000 shows as$10,000.00. - In the template, use
{{TotalPrice \# CurrencyCulture1}}instead of\# Currency. You can define up to five:CurrencyCulture1toCurrencyCulture5. See CurrencyCulture. - Without a culture,
\# Currencyuses the locale. For example, with the India (IN) locale, 125000 shows as₹1,25,000.00.
Fix times that are off by hours
Salesforce stores DateTime values in UTC and shows them in each user's time zone. If a time in the document is off by exactly your offset from UTC, the document shows it in UTC (or another time zone), not in yours. A DateTime near midnight can then also land on the previous or next day.
- Compare the document with the field's value on the record and work out the difference in hours.
- If you only need the date, use a Date field rather than a DateTime field. Date fields have no time zone.
- If you need the time, a formula field that adds a fixed offset, such as
CreatedDate + (2/24), works only in time zones without daylight saving time.
Who can fix it
| Cause | Who |
|---|---|
| Format switches and patterns in the template | The template author |
| NumberCulture and CurrencyCulture parameters | The solution's administrator |
| Org locale, user locale and time zone settings, formula fields | Your Salesforce administrator |
| Times wrong with the correct settings | Docs Made Easy support |
Still stuck?
Contact support and send:
- your Salesforce Org ID (How to share your Org ID)
- the solution name or ID, and a link to the record
- the exact merge field from the template, the value on the record, and the value in the document
- your user locale and time zone, and the org's default locale and time zone (Setup → Company Information)
- the time you generated the document, with your time zone