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

# DAYS

> DAYS函数用于计算两个时间之间相隔的天数，支持在宜搭的多种场景中使用，如表单、流程设计和集成自动化等。通过提供结束时间和开始时间的时间对象，该函数返回两者之间的天数差。

**DAYS**函数用于计算两个时间之间相隔的天数。

## 支持产品场景

DAYS函数支持在宜搭的以下场景中使用。

* 表单（主表字段）
* 表单（业务关联规则）
* 表单（校验）
* 流程设计（校验规则）
* 流程设计（关联操作）
* 集成自动化
* 流程-节点
* 连接器

## 格式

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
DAYS(end_date,start_date)
```

## 属性说明

| **属性**      | **是否必填** | **说明**     |
| ----------- | -------- | ---------- |
| end\_date   | 是        | 结束时间的时间对象。 |
| start\_date | 是        | 开始时间的时间对象。 |

## 返回值

| **返回值类型** | **说明**       |
| --------- | ------------ |
| 数字        | 指定时间之间相差的天数。 |

## 使用示例

如下图所示，你可以使用`DAYS()`函数获取两个日期相差的天数。

<Frame>
  ![](https://yida-support.oss-cn-shanghai.aliyuncs.com/static/png/1703147810622-a02c64ff-a631-4084-8205-9dcb25a26d1c.png)
</Frame>

## 体验

返回两个日期之间的天数。
