Skip to main content
Solved

Calculate a date prior to a date in an event

  • October 18, 2023
  • 1 reply
  • 190 views

Forum|alt.badge.img+1

Hi - I’m looking to calculate a date prior to a date in an event. I know how to use “later” to come up with a future date but i’m looking to get a prior date. For example my event shows the date an upcoming order will be placed. I want to use that date minus 1 day to say you have until X date to edit your order. 

 

Thanks!

Best answer by stephen.trumble

Hey @kdoherty 

Welcome to the community and congrats on your first post! Happy to help!

You should be able to try something like:
{{ variable_name '%Y-%m-%d' as expiration }}{{ expiration|days_later:-1 }}

You would just need to change variable_name to whatever the property is.

Let me know if this works for you!

View original
Did this topic or the replies in the thread help you find an answer to your question?

1 reply

stephen.trumble
Community Manager
Forum|alt.badge.img+60
  • Community Manager
  • 1518 replies
  • Answer
  • October 19, 2023

Hey @kdoherty 

Welcome to the community and congrats on your first post! Happy to help!

You should be able to try something like:
{{ variable_name '%Y-%m-%d' as expiration }}{{ expiration|days_later:-1 }}

You would just need to change variable_name to whatever the property is.

Let me know if this works for you!