Skip to main content
Solved

Inserting Expiry date into email

  • February 10, 2021
  • 1 reply
  • 497 views

Forum|alt.badge.img+2

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?

Best answer by Paul S

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
Did this topic or the replies in the thread help you find an answer to your question?

1 reply

Forum|alt.badge.img+10
  • Klaviyo Employee
  • 101 replies
  • Answer
  • February 12, 2021

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'