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

# YEAREND

> The YEAREND function sets a specified date to the last day of the year. It is supported in multiple YiDA scenarios such as Form and workflow design. This function takes a timestamp as input and returns the modified date timestamp.

This topic describes how to use the `YEAREND()` function, which changes the time portion of a date to `xxxx-12-31 00:00:00`.

## Supported Product Scenarios

The YEAREND function is supported in the following YiDA scenarios.

* Form (main table field)
* Form (business association rule)
* Form (validation)
* Workflow design (validation rule)
* Workflow design (associated action)
* Integration and automation
* Workflow node
* Connector

## Syntax

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
YEAREND(timestamp)
```

## Attributes

| **Attribute** | **Required** | **Description**                                                          |
| ------------- | ------------ | ------------------------------------------------------------------------ |
| timestamp     | Yes          | The timestamp of the date to set. You can use a date component directly. |

## Return Value

| **Return type** | **Description**                                                              |
| --------------- | ---------------------------------------------------------------------------- |
| timestamp       | The modified date timestamp. You can assign it directly to a date component. |

## Example

As shown below, use the `YEAREND()` function to set the hours, minutes, and seconds of a specified date to `xxxx-12-31 00:00:00`.

## Try It Out

Get the last date of the year in which a given date falls.
