---
title: Difference between two dates
slug: difference-between-two-dates
docTags: 
createdAt: 2022-09-07T02:43:04.000Z
---

Returns the difference in minutes between two given dates. There are multiple functions under this definition defined in the table below

| Function Path | Description                                         |
| ------------- | --------------------------------------------------- |
| /diffminutes  | Returns the difference in minutes between two dates |
| /diffhours    | Returns the difference in hours between two dates   |
| /diffmonths   | Returns the difference in months between two dates  |
| /diffdays     | Returns the difference in days between two dates    |

### API Definition

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://orca.pathfix.com/functions/json/diffdays",
  "name": "Date difference API",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "28UsDqyeH3QRdmtVamSQT",
        "code": "{\n    \"output\": \"1\"\n}",
        "language": "200"
      },
      {
        "id": "yIX64DyIuDPJgBRFSfAWb",
        "code": "{\n    \"message\": \"error\"\n}",
        "language": "404"
      }
    ],
    "selectedLanguageId": "28UsDqyeH3QRdmtVamSQT"
  },
  "examples": {
    "languages": [
      {
        "id": "ENcJz9TStG38F0X-taA4x",
        "code": "{\r\n\t\"input\": \"2009-09-01\",\r\n\t\"second_date\": \"2009-09-02\"\r\n}",
        "language": "json"
      }
    ],
    "selectedLanguageId": "ENcJz9TStG38F0X-taA4x"
  },
  "description": "\nCall the following API:",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::















