# Need help with a clock system

**URL:** https://community.thunkable.com/t/need-help-with-a-clock-system/2987638
**Category:** Questions about Thunkable X
**Created:** [May 6, 2024, 12:49pm UTC](https://community.thunkable.com/t/need-help-with-a-clock-system/2987638 "2024-05-06T12:49:09Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![araguilar0944](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@araguilar0944](https://community.thunkable.com/u/araguilar0944)
#### Post date: [May 6, 2024, 12:49pm UTC](https://community.thunkable.com/t/need-help-with-a-clock-system/2987638/1 "2024-05-06T12:49:09Z")

</div>

So for school I’m building a hallway pass system where you are able to fill out the pass during certain times. The problem I’m having is finding a way so during the times you aren’t able to fill it out, it shoots an error. I would really like help with this, please let me know if anyone has any solutions!

---

<div class="post-metadata">

### Author: ![samir.henry3rz](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/samir.henry3rz/32/176572_2.png) [@samir.henry3rz](https://community.thunkable.com/u/samir.henry3rz)
#### Post date: [May 6, 2024, 1:43pm UTC](https://community.thunkable.com/t/need-help-with-a-clock-system/2987638/2 "2024-05-06T13:43:56Z")

</div>

Theoretically, it’s very simple. Just start a variable with a value of 0 and save this variable with a value of 1 when the error occurs and 0 when it is ok. Now the error method depends on how your system is registering the event.

---

<div class="post-metadata">

### Author: ![araguilar0944](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@araguilar0944](https://community.thunkable.com/u/araguilar0944)
#### Post date: [May 6, 2024, 2:10pm UTC](https://community.thunkable.com/t/need-help-with-a-clock-system/2987638/3 "2024-05-06T14:10:37Z")

</div>

Thank you for the insight, but the main issue is like this: I can get the device time, but I need for a certain time to be unavailable. So let’s say you are allowed to go to the bathroom during 9:30-9:40 am, but you try to fill out the pass at 9:20. I need to be able to make it so the pass is not able to be filled out. You get what I’m saying?

---

<div class="post-metadata">

### Author: ![samir.henry3rz](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/samir.henry3rz/32/176572_2.png) [@samir.henry3rz](https://community.thunkable.com/u/samir.henry3rz)
#### Post date: [May 6, 2024, 2:28pm UTC](https://community.thunkable.com/t/need-help-with-a-clock-system/2987638/4 "2024-05-06T14:28:08Z")

</div>

I understood. I recently had a similar problem with this calculation involving dates and times. I managed to solve it by removing the separators, joining and solving as an integer value. It’s much easier to calculate this way. Ex: 09:50 = 0950. IF $data \< 0930 OR $data \> 0940 = false. I think this should work.

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/d/ad1d1af00172abe7df28c83a33479479aaaf7fd0.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: [August 4, 2024, 2:28pm UTC](https://community.thunkable.com/t/need-help-with-a-clock-system/2987638/5 "2024-08-04T14:28:55Z")

</div>

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