# \[Solved\] Finding out whether a variable is within a certain range of numbers

**URL:** <https://community.thunkable.com/t/solved-finding-out-whether-a-variable-is-within-a-certain-range-of-numbers/390113>\
**Category:** Questions about Thunkable X\
**Tags:** solved\
**Created:** [January 3, 2020, 10:45am UTC](https://community.thunkable.com/t/solved-finding-out-whether-a-variable-is-within-a-certain-range-of-numbers/390113 "2020-01-03T10:45:32Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_GD\_ETJ](https://avatars.discourse-cdn.com/v4/letter/_/838e76/32.png) [@\_GD\_ETJ](https://community.thunkable.com/u/_GD_ETJ)\
**Post date:** [January 3, 2020, 10:45am UTC](https://community.thunkable.com/t/solved-finding-out-whether-a-variable-is-within-a-certain-range-of-numbers/390113/1 "2020-01-03T10:45:32Z")

</div>

For my project, I need to check whether an input is within a certain range of numbers (e.g check the input is in the range 1-50, then return true.)

Is there any block/blocks that I can use for this operation?

Side note:  
In the Math blocks, I saw this Constrain Block  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/4/a49d1704ed7413d97f35771288dea7262ef9173f.png)

It looks like something which I could use for my project.  
I do not know what it does though. What does this block do and can I use it?

---

<div class="post-metadata">

**Author:** ![davidsobhysabetb](https://avatars.discourse-cdn.com/v4/letter/d/ce73a5/32.png) [@davidsobhysabetb](https://community.thunkable.com/u/davidsobhysabetb)\
**Post date:** [January 3, 2020, 11:05am UTC](https://community.thunkable.com/t/solved-finding-out-whether-a-variable-is-within-a-certain-range-of-numbers/390113/2 "2020-01-03T11:05:00Z")

</div>

![Untitled](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/0/60dba3edb981c1b87fa2dc86557194da5337d7a8.png)

---

<div class="post-metadata">

**Author:** ![\_GD\_ETJ](https://avatars.discourse-cdn.com/v4/letter/_/838e76/32.png) [@\_GD\_ETJ](https://community.thunkable.com/u/_GD_ETJ)\
**Post date:** [January 3, 2020, 11:12am UTC](https://community.thunkable.com/t/solved-finding-out-whether-a-variable-is-within-a-certain-range-of-numbers/390113/3 "2020-01-03T11:12:06Z")

</div>

Thank you very much for this help!

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [January 3, 2020, 1:38pm UTC](https://community.thunkable.com/t/solved-finding-out-whether-a-variable-is-within-a-certain-range-of-numbers/390113/4 "2020-01-03T13:38:06Z")

</div>

Does this solution work for date ranges as well?

---

<div class="post-metadata">

**Author:** ![davidsobhysabetb](https://avatars.discourse-cdn.com/v4/letter/d/ce73a5/32.png) [@davidsobhysabetb](https://community.thunkable.com/u/davidsobhysabetb)\
**Post date:** [February 10, 2020, 12:30am UTC](https://community.thunkable.com/t/solved-finding-out-whether-a-variable-is-within-a-certain-range-of-numbers/390113/5 "2020-02-10T00:30:49Z")

</div>

Sorry for being late I didn’t notice your reply !  
what do you mean by " date ranges " ? @jared

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [February 10, 2020, 12:43am UTC](https://community.thunkable.com/t/solved-finding-out-whether-a-variable-is-within-a-certain-range-of-numbers/390113/6 "2020-02-10T00:43:19Z")

</div>

I was wondering about filtering data to show only what falls on certain days between a start and end date.

i figured out how to do this using the seconds since 1970 blocks

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [February 10, 2020, 4:27am UTC](https://community.thunkable.com/t/solved-finding-out-whether-a-variable-is-within-a-certain-range-of-numbers/390113/7 "2020-02-10T04:27:59Z")

</div>

> [@jared](#):
>
> i figured out how to do this using the seconds since 1970 blocks

How? If you could post this to the community, others like me could get the idea of how to do it 🙂

Thanks! 😊

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [February 10, 2020, 6:21am UTC](https://community.thunkable.com/t/solved-finding-out-whether-a-variable-is-within-a-certain-range-of-numbers/390113/8 "2020-02-10T06:21:29Z")

</div>

@kartik14

 ![Screen Shot 2020-02-10 at 1.03.43 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/3/e3226fd1ac9abda637649a384f36229a5ff5c86c.png)

check this out. if you have any questions, i’d be happy to answer them! I recently found an API to work with the EPOCH/UNIX seconds since 1970 crap but can’t seem to find it right now.

i do all the math in seconds.

my data entries are stored to airtable with one of the object properties as “seconds since 1970”

---

<div class="post-metadata">

**Author:** ![kartik14](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik14/32/44782_2.png) [@kartik14](https://community.thunkable.com/u/kartik14)\
**Post date:** [February 10, 2020, 6:38am UTC](https://community.thunkable.com/t/solved-finding-out-whether-a-variable-is-within-a-certain-range-of-numbers/390113/9 "2020-02-10T06:38:23Z")

</div>

Oh, I thought it was ~15 blocks only! 😅 😂

**Nice work btw! 👍**

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [February 10, 2020, 6:44am UTC](https://community.thunkable.com/t/solved-finding-out-whether-a-variable-is-within-a-certain-range-of-numbers/390113/10 "2020-02-10T06:44:15Z")

</div>

I wish, there probably is a much easier way to do this!

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:41am UTC](https://community.thunkable.com/t/solved-finding-out-whether-a-variable-is-within-a-certain-range-of-numbers/390113/11 "2024-11-08T11:41:09Z")

</div>


