# Countdown Timer - 14 days from specific date & time

**URL:** <https://forum.adalo.com/t/countdown-timer-14-days-from-specific-date-time/15092>\
**Category:** Get Help\
**Created:** [July 19, 2021, 10:51pm UTC](https://forum.adalo.com/t/countdown-timer-14-days-from-specific-date-time/15092 "2021-07-19T22:51:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ash1](https://avatars.discourse-cdn.com/v4/letter/a/8c91f0/32.png) [@Ash1](https://forum.adalo.com/u/Ash1)\
**Post date:** [July 19, 2021, 10:51pm UTC](https://forum.adalo.com/t/countdown-timer-14-days-from-specific-date-time/15092/1 "2021-07-19T22:51:40Z")

</div>

Hi guys,

I’m trying to use the countdown timer to countdown 14 days from a specific date & time field in my collection. Essentially, a user can buy a discount card that is valid for 14 days and I want to display this to them.

I was hoping to be able to use the date & time field + 1209600 seconds (14 days). This doesn’t seem to work though and it currently starts counting down from 14 says, 5 hours, 13 minutes and 47 seconds. I’m not sure if I’m completely missing the obvious and my calculation is just wrong (it’s been a long day!). Can anyone help?

![image](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/b/b36b74e5cf83c0641433f523f0a99aade1a97be4.png)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/1/11c9a415e19d1202304841dd9bd5502afa49e3c1.png)

Thanks,  
Ash

---

<div class="post-metadata">

**Author:** ![Erik](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/erik/32/7849_2.png) [@Erik](https://forum.adalo.com/u/Erik)\
**Post date:** [July 19, 2021, 11:17pm UTC](https://forum.adalo.com/t/countdown-timer-14-days-from-specific-date-time/15092/2 "2021-07-19T23:17:30Z")

</div>

Hi Ash,

I would create both fields at the same time: purchase date, expiration date (2 weeks after current date/time).

It should be easy to show it once you’ve done that and it’ll be easier to show on the voucher pages etc without using logic.

---

<div class="post-metadata">

**Author:** ![Ash1](https://avatars.discourse-cdn.com/v4/letter/a/8c91f0/32.png) [@Ash1](https://forum.adalo.com/u/Ash1)\
**Post date:** [July 19, 2021, 11:54pm UTC](https://forum.adalo.com/t/countdown-timer-14-days-from-specific-date-time/15092/3 "2021-07-19T23:54:06Z")

</div>

Thanks for the reply @Erik

I’ve created a expiration date as you’ve suggested but I still can’t get the timer to display correctly. What should the formula be in the countdown timer to countdown to the expiry time?

---

<div class="post-metadata">

**Author:** ![Erik](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/erik/32/7849_2.png) [@Erik](https://forum.adalo.com/u/Erik)\
**Post date:** [July 20, 2021, 5:23pm UTC](https://forum.adalo.com/t/countdown-timer-14-days-from-specific-date-time/15092/4 "2021-07-20T17:23:10Z")

</div>

You’ll want to double check this, but from a quick test, I did:

(expirationDate - purchaseDate)\*86400

seems to work.

---

<div class="post-metadata">

**Author:** ![Ash1](https://avatars.discourse-cdn.com/v4/letter/a/8c91f0/32.png) [@Ash1](https://forum.adalo.com/u/Ash1)\
**Post date:** [July 22, 2021, 5:35pm UTC](https://forum.adalo.com/t/countdown-timer-14-days-from-specific-date-time/15092/6 "2021-07-22T17:35:54Z")

</div>

Thanks @Erik

That didn’t quite work but I found a tutorial by Victor which walked me through it. Essentially I needed another property in the order collection which works out of the amount of seconds between the start and end dates. That value is then used for the countdown timer.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/system/32/40401_2.png) [@system](https://forum.adalo.com/u/system)\
**Post date:** [August 1, 2021, 5:36pm UTC](https://forum.adalo.com/t/countdown-timer-14-days-from-specific-date-time/15092/7 "2021-08-01T17:36:11Z")

</div>

Closed on August 1, 2021, 5:36pm UTC

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
