> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowforma.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Calculations - Date difference

> The Date difference rule calculates the gap between two date questions and returns the result in days, hours, or minutes to an output question.

The date difference rule calculates the difference between two dates and returns the result in days, hours, or minutes.

<img src="https://mintcdn.com/flowforma/e4wTC4Z8qF9XOc7u/images/product/creating-flows/business-rules/business-rule-types/business-rule-add-ons/calculations-date-difference/calculations-date-difference-1.png?fit=max&auto=format&n=e4wTC4Z8qF9XOc7u&q=85&s=363ffe6fdcba5568be9135a5e952d6bf" alt="Calculate date difference rule configuration" width="540" height="535" data-path="images/product/creating-flows/business-rules/business-rule-types/business-rule-add-ons/calculations-date-difference/calculations-date-difference-1.png" />

## Title

The first part of the business rule lets you define a **title** for your rule and select the event on which it operates. The default title is the standard **FlowForma** rule name; change it by deleting the text and entering your own.

In the **event** field you determine when the rule is executed. For a flow this can occur when the form is loaded, started, or completed. For a step this can occur when the step is started, saved, or completed. For questions it can occur when the question is updated.

## Rule condition(s)

The second part of the business rule lets you set conditions. These are not required, but if entered they control when the rule is executed in relation to other items in the form.

## Rule actions

* **Start date question:** select the date question you want to use as the start date in the calculation.
* **Finish date question:** select the date question you want to use as the finish date in the calculation.
* **Exclude starting day:** exclude the starting date from the calculation.
* **Return:** select how you want the result of the calculation returned: days, hours, or minutes.
* **Output question:** select the question you want the value to be displayed in on the form.

- **Stop execution**: if stop execution is enabled and this rule is executed, no other rules are executed.
- **Enabled**: rules aren't saved to a list like questions and steps are, so if you want to stop a rule executing without deleting it, toggle this option to enable or disable the rule.
- **Enable audit**: if checked, a record is added to the audit trail when this rule is executed. This option is available when the Compliance feature pack is activated.
