Show calculated date in email delivery

Avatar

Avatar
Validate 10
Level 3
ihm185
Level 3

Likes

24 likes

Total Posts

52 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 3
ihm185
Level 3

Likes

24 likes

Total Posts

52 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
ihm185
Level 3

26-11-2018

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Affirm 25
Level 4
Deb007
Level 4

Likes

50 likes

Total Posts

86 posts

Correct reply

25 solutions
Top badges earned
Affirm 25
Boost 25
Applaud 5
Give Back 5
Validate 1
View profile

Avatar
Affirm 25
Level 4
Deb007
Level 4

Likes

50 likes

Total Posts

86 posts

Correct reply

25 solutions
Top badges earned
Affirm 25
Boost 25
Applaud 5
Give Back 5
Validate 1
View profile
Deb007
Level 4

26-11-2018

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

Answers (1)

Answers (1)

Avatar

Avatar
Validate 10
Level 3
ihm185
Level 3

Likes

24 likes

Total Posts

52 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 3
ihm185
Level 3

Likes

24 likes

Total Posts

52 posts

Correct reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
ihm185
Level 3

26-11-2018

Thank you so much Debabrata.