---
title: daysOffBetween()
slug: daysoffbetween
docTags: 
createdAt: 2021-09-14T17:45:11.000Z
---

Returns the number of days off taken between two given dates.

### Syntax

`daysOffBetween(fromDate, toDate)`

- `fromDate` - the date from which to begin counting number of days off.
- `toDate` - the date at which counting stops. `toDate` is exclusive.&#x20;
- **Return type:** [Number](docId\:ucI5tCTfVBhonEJ6ZQijg)&#x20;

### Sample usage

`daysOffBetween('2020-10-12', '2020-11-12')` returns the number of days off taken during the specified one month period. This will return the number of days excluding `11/12/20`.&#x20;

### Supported data types

| **Input type**                                 | **Return type**                         | **Logic**                                                                                           |
| ---------------------------------------------- | --------------------------------------- | --------------------------------------------------------------------------------------------------- |
| ****[Date](docId\:xTAQdzvLBTAKjxRnpFwe9)  (x2) | [Number](docId\:ucI5tCTfVBhonEJ6ZQijg)  | The function will count the number of days off beginning with `fromDate`, and ending with `toDate`. |
| *Unsupported data types*                       | **[Null](docId\:N9trVqonnBknqL9DrNBP6)  | Unsupported data types return `Null`.                                                               |

