# How can i create a timer that counts down to a specific hour of the day

**URL:** <https://community.thunkable.com/t/how-can-i-create-a-timer-that-counts-down-to-a-specific-hour-of-the-day/2151081>\
**Category:** Questions about Thunkable X\
**Created:** [November 26, 2022, 5:51pm UTC](https://community.thunkable.com/t/how-can-i-create-a-timer-that-counts-down-to-a-specific-hour-of-the-day/2151081 "2022-11-26T17:51:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dinlgsd](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@dinlgsd](https://community.thunkable.com/u/dinlgsd)\
**Post date:** [November 26, 2022, 5:51pm UTC](https://community.thunkable.com/t/how-can-i-create-a-timer-that-counts-down-to-a-specific-hour-of-the-day/2151081/1 "2022-11-26T17:51:30Z")

</div>

i can’t wrap my head around how to get the difference between the user’s current time, and the specific hour of that day, and then display the time until that hour in a timer that counts down to it.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [November 26, 2022, 6:01pm UTC](https://community.thunkable.com/t/how-can-i-create-a-timer-that-counts-down-to-a-specific-hour-of-the-day/2151081/2 "2022-11-26T18:01:49Z")

</div>

You can do this with Thunkable blocks but it might be easier to use Javascript. I Googled _time until Javascript_ and found this: [date - JavaScript Time Until - Stack Overflow](https://stackoverflow.com/questions/14764029/javascript-time-until)

---

<div class="post-metadata">

**Author:** ![dinlgsd](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@dinlgsd](https://community.thunkable.com/u/dinlgsd)\
**Post date:** [November 26, 2022, 7:49pm UTC](https://community.thunkable.com/t/how-can-i-create-a-timer-that-counts-down-to-a-specific-hour-of-the-day/2151081/3 "2022-11-26T19:49:55Z")

</div>

how would i go about using javascript in thunkable?

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [November 26, 2022, 10:20pm UTC](https://community.thunkable.com/t/how-can-i-create-a-timer-that-counts-down-to-a-specific-hour-of-the-day/2151081/4 "2022-11-26T22:20:26Z")

</div>

I’m on my phone so I’m not sure I can find it now but there are topics about JavaScript on the forums. You use the Webviewer component to load an .html file with a JavaScript script and then send and receive messages.

---

<div class="post-metadata">

**Author:** ![adyupl](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@adyupl](https://community.thunkable.com/u/adyupl)\
**Post date:** [November 29, 2022, 7:21am UTC](https://community.thunkable.com/t/how-can-i-create-a-timer-that-counts-down-to-a-specific-hour-of-the-day/2151081/5 "2022-11-29T07:21:48Z")

</div>

I made this.But not sure it works ( Live test don’t work now :C)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/6/c68dab0dc5001a6ceda747005d9e9ad4c0b1b200.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [February 27, 2023, 7:22am UTC](https://community.thunkable.com/t/how-can-i-create-a-timer-that-counts-down-to-a-specific-hour-of-the-day/2151081/6 "2023-02-27T07:22:46Z")

</div>

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