Skip to main content

If I have created an abandoned email using flow and included Dynamic Promotion Code inside the email.

The promotion will only be activated when the email send out, and ends in 3 hours after the email is out.  

How can I show the start and end date of the Promotion in the email Content

Hello @pmjchan,

Great question! 

Although it is possible to display the current date and time the email was sent out and even display a time X-days later; it is currently not possible to calculate X-hours later. 

To display the current date and time, you can use the following syntax: {% today "%m/%d/%Y %I:%M" as today %} {{ today }} which would display as 07/02/2021 04:05. You can also re-order and redisplay how the dates and time is rendered by referencing the Django filters and tags available here: https://docs.djangoproject.com/en/1.8/ref/templates/builtins/

Furthermore, if you did decide to opt-in to using X-days later instead, @retention has a great answer in the following Community post. I would also suggest taking a look at the How to Format Date Variables in Templates article to learn more about formatting dates within a template. 

I hope this helps!

David
 


Does this definitely display the date the email is sent out +7 days or does it display the date the email is opened + 7 days?


@Klum House,

It has been a while since I have done testing, and I can’t remember for sure - but I think it displays the date 7 days after the email is opened. To test it yourself, insert the code below into an email and send it to yourself:

{% today '%Y-%m-%d' as today %} {{ today|days_later:7 }}

Wait at least 24 hours before opening the email, and see if the display date is 7 days from the send date or open date.

Good luck!


Reply