Solved

Inserting Expiry date into email

  • 10 February 2021
  • 1 reply
  • 51 views

Badge

I’m currently building some flows for VIP customers and I want to insert the expiry date underneath the coupon code. The date will be one year from when they receive the email, anyone know how to do this?

icon

Best answer by Paul S 12 February 2021, 17:52

Hi @Prosper,

 

So what you can do is insert a tag underneath the coupon in your template. In your case, since the coupon is meant to expire one year from when they receive the email you could use the following tag in your template beneath the coupon:

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

 

So for example, {% today '%Y-%m-%d' as today %} would return the format 2021-02-12 

 

Note the date needs to be in the format '%Y-%m-%d' OR '%Y-%m-%dT%H:%M:%S' OR '%m-%d-%Y'  

View original

1 reply

Userlevel 5
Badge +3

Hi @Prosper,

 

So what you can do is insert a tag underneath the coupon in your template. In your case, since the coupon is meant to expire one year from when they receive the email you could use the following tag in your template beneath the coupon:

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

 

So for example, {% today '%Y-%m-%d' as today %} would return the format 2021-02-12 

 

Note the date needs to be in the format '%Y-%m-%d' OR '%Y-%m-%dT%H:%M:%S' OR '%m-%d-%Y'  

Reply