Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

The 4th edition of the Campaign Community Lens newsletter is out now!
SOLVED

Show calculated date in email delivery

Avatar

Level 4

Hello everyone,

there is an email delivery scheduled to be sent every day at a list of recipients. I need a dynamic value (a date - 60 days from every current date of delivery) in the delivery. e.g, if the email is sent today, i want to display a date 60 days from today in the email. If the email is sent tomorrow, i want to display a date 60 days from tomorrow. I can easily do that using javascript but that is not working in delivery templates. How can I set a calculated dynamic value to an option which can be used in delivery templates and will change its value every day.  Please help me.

Imran

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi Imran,

The following shall work with delivery template.

<%var d =new Date();

d.setDate(d.getDate()-60);%>

<%= formatDate(d, "%2D/%2M/%4Y") %>

Regards,

Deb

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi Imran,

The following shall work with delivery template.

<%var d =new Date();

d.setDate(d.getDate()-60);%>

<%= formatDate(d, "%2D/%2M/%4Y") %>

Regards,

Deb

The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now