The ADJUST parameter adds or subtracts time from a Salesforce date or datetime field when the document is generated. The value stored in Salesforce doesn't change.
Use it for due dates, follow-up reminders, expiration dates or renewal periods that depend on a reference date, such as Opportunity.CloseDate, CreatedDate or today's date.
Syntax
{{ADJUST:MyDateField:Year:Month:Day:Hour:Minute:Second}}
Values
| Component | Effect |
|---|---|
MyDateField | The date or datetime field to adjust, for example Opportunity.CreatedDate. |
Year, Month, Day, Hour, Minute, Second | A whole number for each time unit, in this order. A positive number adds time (for example, +30 days), a negative number subtracts it (for example, -7 days), and 0 leaves that unit unchanged. |
Where to add it
Type the ADJUST merge field in your Word template where you want the adjusted date to appear.
Example
| Original value | Syntax | Output |
|---|---|---|
| 2025-03-03T06:57:49.000 | {{ADJUST:Opportunity.CreatedDate:1:1:1:1:1:1}} | 2026-04-04T07:58:50.000 |
| 2025-03-03T06:57:49.000 | {{ADJUST:Opportunity.CreatedDate:0:0:0:0:0:0}} | 2025-03-03T06:57:49.000 |
| 2025-03-03T06:57:49.000 | {{ADJUST:Opportunity.CreatedDate:-1:-1:-1:-1:-1:-1}} | 2024-02-02T05:56:48.000 |
Works in
The examples on this page use a Word template.
Notes
ADJUSTchanges only the value shown in the generated document. The Salesforce record keeps its original date.- To keep a time unit unchanged, set it to
0.
Common errors
- The adjusted value is blank. The date field is empty on the record, or the field name has a typo. See Merge fields are blank or show their tags.
- An error names the field, such as "No such column". The field name is wrong or you can't see the field. See DME-SF-002.
- The time or date is off by some hours or by a day. DateTime values can be shown in a different time zone from yours. See Dates, numbers or currency are in the wrong format.