On this page
Add a date merge tag
Insert a dynamic date into a campaign or subject line, offset to past or future, formatted how you like.
The [DATE] merge tag inserts a dynamic date into your subject line or content - today's date, or one offset from it. It's perfect for recurring newsletters, event reminders and deadlines, saving you editing the date by hand each time. One limit: you can't use [DATE] inside a link.
The syntax
The tag takes two parameters - a number and a format:
[DATE|0|format]
The number offsets the date in seconds from now: 0 is today, a positive number is the future, a negative number is the past.
The format controls how it's displayed, using PHP date conventions. Long-form dates like "Monday, June 10" are English-only.
Examples
If today is 10 June 2013:
[DATE|86400|m.d.y]shows 06.11.13 (86,400 seconds = 1 day ahead).[DATE|-259200|F j, Y]shows June 07, 2013 (259,200 seconds = 3 days back).
Common formats
| Format | Output | Description |
|---|---|---|
Y-m-d |
2013-06-10 | Year-month-day (numeric) |
F j, Y |
June 10, 2013 | Full month, day, year |
M d, Y |
Jun 10, 2013 | Short month, day, year |
m/d/Y |
06/10/2013 | Month/day/year |
l, F j |
Monday, June 10 | Weekday, month, day |
Handy intervals
- 1 day = 86,400 seconds
- 1 week = 604,800 seconds
- 30 days = 2,592,000 seconds
Troubleshooting
The date doesn't show, or shows wrong - follow the [DATE|seconds|format] syntax exactly, separate the parameters with pipes, and use valid PHP format codes. Start with a simple format like Y-m-d.
Wrong timezone - dates use the server timezone, not the recipient's, so allow for that and for daylight saving.
Calculations are off - double-check your seconds (86,400 = 1 day), and use negative for past, positive for future.
For the full set of tags, see Add merge tags to a campaign. Stuck? Open a support ticket.