> ## 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.

# YEAR

> YEAR函数用于获取选定时间的年份，支持在宜搭的多种场景中使用，如表单、流程设计等。通过给定日期参数，返回对应的年份数字。

**YEAR**函数用于获取选定时间的年份。

## 支持产品场景

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

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

## 格式

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
YEAR(date)
```

## 属性说明

| **属性** | **是否必填** | **说明** |
| ------ | -------- | ------ |
| date   | 是        | 时间对象。  |

## 返回值

| **返回值类型** | **说明** |
| --------- | ------ |
| 数字        | 日期年份。  |

## 使用示例

如下图所示，你可以使用`MONTH()`函数获取用户选择的时间月份。

<Frame>
  ![](https://yida-support.oss-cn-shanghai.aliyuncs.com/static/png/1703125143485-f0713cb9-033e-437a-adc3-9b1c82240ae2.png)
</Frame>

## 体验

返回某日期的月份， 月份是介于 1 到 12 之间的整数。
