How to Format Dates in Salesforce Template Fields
You can use the following parameters to format dates in your Salesforce campaign and attribution templates.
Parameters | Description |
---|---|
d |
Day of the month, 2 digits with leading zeros |
j |
Day of the month without leading zeros |
F |
A full textual representation of a month, such as January or March |
m |
Numeric representation of a month, with leading zeros |
M |
A short textual representation of a month, three letters |
n |
Numeric representation of a month, without leading zeros |
Y |
A full numeric representation of a year, 4 digits |
y |
A two-digit representation of a year |
For example:
My Campaign %campaign_start_date(Y-m)%
Will output:
My Campaign 2020-04