Show calculated date in email delivery | Community
Skip to main content
Level 3
Nov 26, 2018 8:51 AM UTC
Solved

Show calculated date in email delivery

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
DebTrAccepted solution
Level 6
Nov 26, 2018 11:34 AM UTC

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

2 replies

ihm185Author
Level 3
Nov 26, 2018 2:29 PM UTC

Thank you so much Debabrata.

Translate
DebTrAccepted solution
Level 6
Nov 26, 2018 11:34 AM UTC

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

Translate