Solved

Calculating a future date using an Event Trigger Date

  • 21 September 2023
  • 2 replies
  • 143 views

Badge +1
  • Contributor III
  • 5 replies

Hi everyone

Still learning my ropes around Klaviyo and the dynamic variables. I found an article that allows you to calculate a future date using the “today” syntax, however does anyone know if it’s possible to calculate a future date using an event trigger property? I assumed that by adding the ‘days_later:XX’ filter, this would have made this possible, but it’s throwing an error. 

Variable Code: {{ event.Invoice_Date|days_later:90|format_date_string|date:'d F o'|default:'' }}

Scenario: Wanted to communicate to customers payment due dates based on their order invoice date. 

Any suggestions and guidance would be highly appreciated! 

icon

Best answer by Taylor Tarpley 22 September 2023, 16:02

View original

2 replies

Userlevel 7
Badge +60

Hi there @Pez

 

Welcome to the Community! Happy to help! 

 

Great job investigating so far! The reason why your syntax isn’t working is because the |dayslater filter only works for “today” and can’t be replaced with another property. I know some customers have previously reformatted the date as a unix timestamps to concert this, however, I’m going to raise this question to our tempalte team and see what I can find! 

 

Thanks for participating in the Community! 

-Taylor 

I have a similar issue.

I need to calculate and display a future date based on the Birthday profile property. If anyone has any work-arounds, I am all ears. This comes up a lot for my clients, especially regarding discount code expiration.

Reply