# Time Difference

> Kalipso Studio 6.1 documentation · https://doc.sysdevmobile.com/kalipso/6.1/documentation/expressions/functions/time-functions/time-difference
>
> TimeDiff returns the time between two times in HHMMSS format as an HHMMSS string, never negative.

This Function returns a _\<string>_, which is the time between the specified **Time 1** and **Time 2.**

### Parameters

* **Time** 1 _\<string> -_ Time to subtract the **Time 2** from. This parameter must be in format HHMMSS.
* **Time** 2 _\<string>_ - Time to subtract from **Time 1**. This parameter must be in format HHMMSS.

### **Examples**

* _Example 1_

TimeDiff("090101", "100101")\
**Result** = 010000

* _Example 2_

TimeDiff("100101", "090101")\
**Result** = 010000

:::info
If **Time** 1 is later than **Time** 2, the parameters order is inverted in runtime. Therefore, the result of this function is never preceded with a minus sign.
:::
