# \[Solved\] How to use date functions in Thunkable X

**URL:** <https://community.thunkable.com/t/solved-how-to-use-date-functions-in-thunkable-x/71693>\
**Category:** Questions about Thunkable X\
**Tags:** solved, beginner\
**Created:** [March 9, 2019, 5:04am UTC](https://community.thunkable.com/t/solved-how-to-use-date-functions-in-thunkable-x/71693 "2019-03-09T05:04:17Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![ali4oman](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@ali4oman](https://community.thunkable.com/u/ali4oman)\
**Post date:** [March 9, 2019, 5:04am UTC](https://community.thunkable.com/t/solved-how-to-use-date-functions-in-thunkable-x/71693/1 "2019-03-09T05:04:17Z")

</div>

Continuing the discussion from [Dates Functions](http://community.thunkable.com/t/dates-functions/71644):

Hi

1- How can I add # of days to a specific date, for example adding 100 days to 28/02/2019.  
2- How can I calculate # of days between 2 dates, for example how many days between 15/04/2018 and 20/03/2019.  
3- How can I get the day of the week from Jason for specific date, for example what is the day of the week on 15/05/2018  
4- Is it possible to have Date Picker to choose dates from in Thunkable X same as the one in thunkable classic.

thanks

---

<div class="post-metadata">

**Author:** ![bymaho](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/bymaho/32/56102_2.png) [@bymaho](https://community.thunkable.com/u/bymaho)\
**Post date:** [September 26, 2019, 10:05am UTC](https://community.thunkable.com/t/solved-how-to-use-date-functions-in-thunkable-x/71693/2 "2019-09-26T10:05:28Z")

</div>

I need the answers of these questions.

---

<div class="post-metadata">

**Author:** ![jane](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jane/32/27575_2.png) [@jane](https://community.thunkable.com/u/jane)\
**Post date:** [September 26, 2019, 2:00pm UTC](https://community.thunkable.com/t/solved-how-to-use-date-functions-in-thunkable-x/71693/3 "2019-09-26T14:00:01Z")

</div>

Hi @ali4oman and @bymaho,  
Answer 1:  
If you have a table of how many days are in each month, you can add a **number** of days to your date by:

1. if (days left in month) \< number, set new date to last day of original month, set **number** to ( **number** - (days left in month)).  
Example: 14 Feb 2019 + 100 days = 28 Feb 2019 + 86 days
2. For as long as the next month of days is less than **number** , add 1 month to new date and take that many days away from **number**  
Example: 28 Feb 2019 + 86 days = 31 Mar 2019 + 55 days = 30 Apr 2019 + 25 days
3. Add the remaining **number** to your date  
Example: 30 Apr 2019 + 25 days = 25 May 2019

Answer 2:  
Using a method like above, if two dates are in different months the # of days between them is (days between start date and end of month) + (days between end date and start of month) + (number of days in any full months between start date and end date)

Answer 3:  
If you use the [date input](https://docs.thunkable.com/date-input) in your app, you can see what the day of the month was on a given date. If you want to type a date and get a day of the week, use an API with our [Web API](https://docs.thunkable.com/web-api) component for this purpose.

Answer 4: [There sure is!](https://docs.thunkable.com/date-input)

Hope this helps 😄

---

<div class="post-metadata">

**Author:** ![bymaho](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/bymaho/32/56102_2.png) [@bymaho](https://community.thunkable.com/u/bymaho)\
**Post date:** [September 28, 2019, 11:40am UTC](https://community.thunkable.com/t/solved-how-to-use-date-functions-in-thunkable-x/71693/4 "2019-09-28T11:40:15Z")

</div>

a little bit crayz but it works. Anyone can try it.  
These blocks calculate the exact date between two dates.

 ![dehset](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/d/7d7a833582c5e2f5dbc5bb2d1c3d79269d47d502.png)

---

<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 10, 2020, 3:45pm UTC](https://community.thunkable.com/t/solved-how-to-use-date-functions-in-thunkable-x/71693/5 "2020-01-10T15:45:04Z")

</div>

Hey! This is sweet! Thank you!!

I will be using this to figout out EPOCH time to use timestampps for data filtering from airtable!

---

<div class="post-metadata">

**Author:** ![go1tentcjzwu](https://avatars.discourse-cdn.com/v4/letter/g/ecd19e/32.png) [@go1tentcjzwu](https://community.thunkable.com/u/go1tentcjzwu)\
**Post date:** [February 27, 2020, 5:44am UTC](https://community.thunkable.com/t/solved-how-to-use-date-functions-in-thunkable-x/71693/6 "2020-02-27T05:44:14Z")

</div>

Hi @jane.  
How to use blocks for your answer?  
Could you show me?

I will use 2 date pickers and make a list of date.  
For example, 2020-02-11,2020-02-12,2020-02-13,2020-02-14

I can’t make different days each month.

please give me an idea.

Thanks

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [May 8, 2020, 9:40am UTC](https://community.thunkable.com/t/solved-how-to-use-date-functions-in-thunkable-x/71693/7 "2020-05-08T09:40:13Z")

</div>

@go1tentcjzwu - can you share a screenshot of the blocks you are using at the moment and we can point you in the right direction from there.

Thanks.

---

<div class="post-metadata">

**Author:** ![go1tentcjzwu](https://avatars.discourse-cdn.com/v4/letter/g/ecd19e/32.png) [@go1tentcjzwu](https://community.thunkable.com/u/go1tentcjzwu)\
**Post date:** [May 12, 2020, 8:12am UTC](https://community.thunkable.com/t/solved-how-to-use-date-functions-in-thunkable-x/71693/8 "2020-05-12T08:12:35Z")

</div>

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

I use 2 date pickers.  
Left blocks is first pick.  
Right is second.

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [May 12, 2020, 9:46am UTC](https://community.thunkable.com/t/solved-how-to-use-date-functions-in-thunkable-x/71693/9 "2020-05-12T09:46:28Z")

</div>

Thanks @go1tentcjzwu

> [@go1tentcjzwu](#):
>
> I can’t make different days each month.

So what are you trying to do here?

Are you setting start dates and end dates? do you want to create an array of dates between these two values?

---

<div class="post-metadata">

**Author:** ![go1tentcjzwu](https://avatars.discourse-cdn.com/v4/letter/g/ecd19e/32.png) [@go1tentcjzwu](https://community.thunkable.com/u/go1tentcjzwu)\
**Post date:** [May 12, 2020, 11:44am UTC](https://community.thunkable.com/t/solved-how-to-use-date-functions-in-thunkable-x/71693/10 "2020-05-12T11:44:00Z")

</div>

My solution is up there.  
I solved it.  
Thanks

---

<div class="post-metadata">

**Author:** ![nabeela.akram5rbtna](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/nabeela.akram5rbtna/32/141210_2.png) [@nabeela.akram5rbtna](https://community.thunkable.com/u/nabeela.akram5rbtna)\
**Post date:** [February 13, 2023, 12:12pm UTC](https://community.thunkable.com/t/solved-how-to-use-date-functions-in-thunkable-x/71693/11 "2023-02-13T12:12:07Z")

</div>

Hi I tried using the method you did but how to fetch the values from API?

---

<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:29am UTC](https://community.thunkable.com/t/solved-how-to-use-date-functions-in-thunkable-x/71693/12 "2024-11-08T11:29:15Z")

</div>


