All Collections
Dynamic placeholders
How do I use the Dynamic date placeholder?
How do I use the Dynamic date placeholder?
Karan avatar
Written by Karan
Updated over a week ago

The dynamic date placeholder allows you to add and customize a date to your mailing. This is the basic structure of the placeholder:

{{dateDays 0 ''}}

By adding specific parameters between the '' or changing the 0 to another number the date and its style can be altered. Following you can find an example how to work with the placeholder: 

Date and day:

Note that the date of this article's creation is March 27th 2020, so in the following examples "today" is that date.

{{dateDays 0 'DD.MM.YYYY'}} - will show today expressed as 27.03.2020 

The 0 next to dateDays expressed the number of days from today, so 0 is in fact, today. -1 is yesterday and 1 is tomorrow.

hubsell will always set the day of the sending as "today" or "0"

So, with the above in mind, if you want to show the date of 5 days from the date of sending in the format of DD.MM.YYYY the formula would be:

{{dateDays 5 'DD.MM.YYYY'}} which, if the sending was today, would be 01.04.2020

Any characters added between '' other than the ones listed below will be shown as is. E.g.

M will always convert to Month with minimal amount of digits, and M- will be 3-, and M-dd would be 3-27.

Parameters

Month with minimal digit -  M (e.g 1 2 ... 11 12)
Month with two digits - MM (e.g. 01 02 ... 11 12)
Month name three letters (EN)- MMM (e.g Jan Feb ... Nov Dec)
Month fully (EN) - MMMM (e.g. January February ... November December)
Month date minimal digits - D (e.g. 1 2 ... 30 31)
Month date two digits - DD (e.g. 01 02 ... 30 31)
Month date w/ nth - Do (e.g. 1st 2nd ... 30th 31st)
Weekday name two letters (EN) - dd (e.g. Su Mo ... Fr Sa)
Weekday name three letters (EN) - ddd (e.g. Sun Mon ... Fri Sat)
Weekday name full (EN) - dddd (e.g. Sunday Monday ... Friday Saturday)




Did this answer your question?