Adding Dynamic Expiration Dates to Templates


We are sending coupon codes to new Contacts.  How can I add a dynamic expiration date to my Template so the customer knows when the offer will expire?


You can do this by defining a new variable that is today's date (the day the Campaign will be deployed) and formatting it so that it appears the way you want it.

Following is an example based on today's date (09/25/2015) with the results:


%%set dateLook = "MM/dd/yyyy"%%

%%set newDate = {{eval dateadd [7]}}%%

%%eval formatdate $dateLook $newDate%%



Here is a breakdown of the above commands:
  • dateLook - New variable that defines the format for your date value.
  • newDate - New variable that will be your calculated date
  • eval dateadd - Command that allows you to add a certain number of days to a given date
  • - Command that pulls in today's date
  • eval formatdate $dateLook $newDate - Putting everything together, this takes the newDate value and formats it to look the way that was defined by the dateLook variable.
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Powered by Zendesk