# Duration between hours on different days

**URL:** <https://community.thunkable.com/t/duration-between-hours-on-different-days/1662003>\
**Category:** Questions about Thunkable X\
**Created:** [December 28, 2021, 11:42pm UTC](https://community.thunkable.com/t/duration-between-hours-on-different-days/1662003 "2021-12-28T23:42:01Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [December 30, 2021, 12:00pm UTC](https://community.thunkable.com/t/duration-between-hours-on-different-days/1662003/7 "2021-12-30T12:00:35Z")

</div>

You can use a `web viewer` and get the duration using JavaScript code.  
You can also build a Google Apps Script code and deploy it so you can use it as `web API`.

Thunkable X is open code in this regards so you can choose many other ways to get the calculations.

See this post which I explained an example of how to get the date after number of days (added or subtracted).

> [@Date operations (No API)](https://community.thunkable.com/t/date-operations-no-api/1355407):
>
> Hi everyone It´s been a while since my last post in the community I have a couple of questions regarding operations with dates (I didn´t find a solution on the community thad doesn´t use API´s) I need to pick a date and do some maths with it and then show the results in other labels Example: I selected 2021-10-21 Then: Label 1: 2021-10-21 + 5= 2021-10-26 Label 2: 2021-10-26 (result of the previous operation) + 10= 2021-11-05 Of course ther is two “problems”. Wich blocks I need to use? Ho…

---

_[View the full topic](https://community.thunkable.com/t/duration-between-hours-on-different-days/1662003)._
