> For the complete documentation index, see [llms.txt](https://doc.sysdevmobile.com/kalipso5/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.sysdevmobile.com/kalipso5/developing/form/expressions/functions/functions-descriptions/date-functions/date-difference.md).

# Date Difference

Kalipso - Form - Expressions - Functions - Functions Descriptions - Date Functions - Date Difference

This Function returns a *\<numeric>*, which is the number of days between the specified **Date 1** and **Date 2**.

### Parameters

* **Date 1** *\<string> -* Date to subtract the **Date 2** from. This parameter must be in format YYYYMMDD.
* **Date 2** *\<string> -* Date to subtract from **Date 1**. This parameter must be in format YYYYMMDD.

### **Examples**

* *Example 1*

DateDiff("20100307", "20100301")\
**Result** = 6

* *Example 2*

DateDiff("20100301", "20100307")\
**Result** = 6

{% hint style="info" %}
If **Date 1** is later than **Date 2**, the parameters order is inverted in runtime. Therefore, the result of this function is always a positive number or zero.
{% endhint %}
