# DATEDIF

DATEDIF(`start date`, `end date`, `part`)

Returns the differences between pairs of dates/times.

### Arguments

| Argument     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `start date` | Date/time value(s) corresponding to `start date`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `end date`   | Date/time value(s) corresponding to `end date`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `part`       | <p>Part of the date/time objects to calculate the difference by. Supported parts:</p><ul><li><code>weeks</code> or <code>week</code> or <code>wks</code> or <code>wk</code> or <code>W</code></li><li><code>days</code> or <code>day</code> or <code>d</code> or <code>D</code></li><li><code>hours</code> or <code>hour</code> or <code>hrs</code> or <code>hr</code> or <code>h</code></li><li><code>minutes</code> or <code>minute</code> or <code>mins</code> or <code>min</code> or <code>m</code></li><li><code>seconds</code> or <code>second</code> or <code>secs</code> or <code>sec</code> or <code>s</code></li><li><code>ms</code> (milliseconds)</li></ul> |

### Outputs

Differences between starting and ending dates/times.

Each difference is a whole number representing full date part differences between the end and start dates/times.

These whole numbers can be positive or negative. Fractional differences are rounded *down* to the nearest whole number.

### Example

{% embed url="<https://datawrapper.dwcdn.net/GoVN7/1/>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.auditboardanalytics.com/workflows/expression-builder/functions/date-time/datedif.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
