Skip to main content

Hi There,

 

I need to put an expiration date in a flow template, it show the current date (of email sent to customer) and the expiration date will be 7 days from current date.

 

Ideally it would be the D d M Y format but if this isn’t possible anything else would do.

 

I’ve check Django resources, however have had no luck at getting the date to show correctly.

 

Any help would be greatly appreciated. Thanks, Reece

@Reece Stevenson 

It is possible, but unfortunately not in the D-M-Y format for the +7 days.

 

Today: {% today '%Y-%m-%d' as today %} {{ today }}

7 Days Later: {% today '%Y-%m-%d' as today %} {{ today|days_later:7 }}

 

Note the date needs to be in the format '%Y-%m-%d' OR '%Y-%m-%dT%H:%M:%S' OR '%m-%d-%Y' for the +7 days to work.

 

Hope this helps!


Great thanks for the help, Joseph!


Hi @retention,

This is still the only option to go with date with time using days_later?
%Y-%m-%dT%H:%M:%S - because wit that structure its not very nice to show in newsletter :)

 

 


Reply