Skip to main content
Contributor I
April 15, 2026
Solved

Issue with future date formatting

  • April 15, 2026
  • 4 replies
  • 154 views

Hey all,

I’m having an issue with date formatting for future dates. Our business is Australian, so we’re after the DD-MM-YYYY format.

A bit of background: We have a birthday flow that includes a special offer, valid for 30 days. At the bottom of the email, I’ve included T&Cs which includes the expiration date of their offer. The standard format I’ve used (which works just fine) is:

 {% today '%m-%d-%Y' as today %} {{ today|days_later:30 }}

However, as soon as I try to introduce formatting to have the date show as DD-MM-YYYY all I see is a blank space in my test sends. Below are a few different variations I’ve tried, all with no luck. Does anyone know if it’s possible change the formatting so it makes sense to our customer base? 

{% today '%m-%d-%Y' as today %} {{ today|days_later:30|date:'%d-%m-%Y' }}

{% today '%m-%d-%Y' as today %} {{ today|days_later:30|date:'d-m-Y' }}

{% today '%m-%d-%Y' as today %} {{ today|days_later:30|format_date_string|date:'d-m-Y' }}

Appreciate any support!

Cheers,

Samantha

 

    Best answer by Kylie W

    Hi ​@samanthac 

    Love your use case for this! Making it super clear for customers.

    I’ve done a bit of digging into this and could you try: {% today '%Y-%m-%d' as today %} {{ today|days_later:30|format_date_string|date:'d-m-Y' }} and let me know if this helps?

    4 replies

    Christiannoerbjerg
    Expert Problem Solver II
    2025 Champion
    April 15, 2026

    Hi ​@samanthac

    Thank you for posting in the community - I’ll try to help you as best as i can.

    A thing you could try is to format the date inside the today tag itself, since days_later will preserve whatever format you set there. You could try this:

    {% today '%d-%m-%Y' as today %}{{ today|days_later:30 }}

    That should output something like 15-05-2026 for an offer generated today.

    The reason your original '%m-%d-%Y' version worked is that days_later was just doing string math on the format you gave it. Change the format at the source and the 30-days-later output follows the same pattern.

    Let me know, if it works :-)

    Cheers

    samanthacAuthor
    Contributor I
    April 16, 2026

    Hey ​@Christiannoerbjerg - Unfortunately no luck with that one - it displays the ‘invalid variable’ error code when I try to send a preview. I believe it needs to be {% today '%m-%d-%Y' as today %} as Klaviyo’s ‘standard’ formatting. 

    Thank you for the suggestion, though!

    Kylie W
    Partner - Silver
    Kylie WAnswer
    Champion & Partner
    April 16, 2026

    Hi ​@samanthac 

    Love your use case for this! Making it super clear for customers.

    I’ve done a bit of digging into this and could you try: {% today '%Y-%m-%d' as today %} {{ today|days_later:30|format_date_string|date:'d-m-Y' }} and let me know if this helps?

    Berridge Strategy Group, Your eCommerce Partner - eCommerce results, without the Complexity | Klaviyo Partner & 2024 Klaviyo Community Champion | www.berridgestrategy.com
    samanthacAuthor
    Contributor I
    April 17, 2026

    @Kylie W - Thank you for your input on this one. I just ran a test with your solution and it worked! Thanks again :)