Skip to main content
Solved

Dynamic timer for 12 hours (need help editing code)

  • April 10, 2025
  • 1 reply
  • 49 views

Forum|alt.badge.img

Hi there.

I have code for a dynamic timer that works well for 24, 48, 72... and so on hours. But today I needed to make it 12 hours. As I understand, I need to change this days_later:1 setting, but how? I've already tried several options and none of them worked. I would really appreciate any advice or solutions if any.

Here’s my code:

<a href="https://www.klaviyo.com">{% today "%Y-%m-%dT%H:%M:%S" as today %}<img style="text-align: center;" src="https://gen.sendtric.com/countdown/0lvrjmmo2u?to={{ today|days_later:1 |format_date_string|date:'U'}}" alt="ENDS IN 12 HOURS" width="280"></a>

Best answer by emma.owens

Hi ​@klovackdesign ! 

Thank you for reaching out to the Community. Have you considered trying to use a third party like MailTimers to set up a countdown in your email? We have a whole guide on how to set this up, and it will likely save you some time rather than having to build out custom HTML code! 

Here is the guide I am referencing: How to add a countdown timer to an email 

I hope this helps! 

1 reply

emma.owens
Community Manager
Forum|alt.badge.img+20
  • Community Manager
  • 216 replies
  • Answer
  • April 11, 2025

Hi ​@klovackdesign ! 

Thank you for reaching out to the Community. Have you considered trying to use a third party like MailTimers to set up a countdown in your email? We have a whole guide on how to set this up, and it will likely save you some time rather than having to build out custom HTML code! 

Here is the guide I am referencing: How to add a countdown timer to an email 

I hope this helps!