> For the complete documentation index, see [llms.txt](https://appmaster.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://appmaster.gitbook.io/docs/business-logic/block/functions/date-and-time/date-and-time-difference.md).

# Date & Time Difference

Returns the difference between 2 date & time values.

**Example:** Date & Time Difference(A: 18th Nov 2021, B: 20th Nov 2021) = 2 days.

**Tip:** always make sure that the "B" data input is larger than/equal to the "A" data input.

### Flow Connections <a href="#flow-connections" id="flow-connections"></a>

* \[Input] In - starts the block's execution.
* \[Output] Out - activates when the block has finished its execution.

### Data Connections <a href="#data-connections" id="data-connections"></a>

* \[Input] A (date/time/date & time/time span) - 1st value to be evaluated.
* \[Input] A (date/time/date & time/time span) - 2nd value to be evaluated.
* \[Output] Time Span (time span) - difference between "A" and "B" data inputs, as in "B" - "A".
