# Modify date with duration

The date to adjust with given duration. Must be a valid ISO8601 date. Modify date with duration lives in the **Date & Time** category of the `fx` menu.

## Parameters

| Parameter              | Type    | Required | Default | Description                                                                                               |
| ---------------------- | ------- | -------- | ------- | --------------------------------------------------------------------------------------------------------- |
| Input                  | string  | yes      | —       | Value to transform. Previous step output or a literal.                                                    |
| Operator               | string  | yes      | `Add`   | The operator to use on the input date.                                                                    |
| Years to adjust        | number  | no       | —       | The number of years to adjust.                                                                            |
| Months to adjust       | number  | no       | —       | The number of months to adjust.                                                                           |
| Weeks to adjust        | number  | no       | —       | The number of weeks to adjust.                                                                            |
| Days to adjust         | number  | no       | —       | The number of days to adjust.                                                                             |
| Hours to adjust        | number  | no       | —       | The number of hours to adjust.                                                                            |
| Minutes to adjust      | number  | no       | —       | The number of minutes to adjust.                                                                          |
| Seconds to adjust      | number  | no       | —       | The number of seconds to adjust.                                                                          |
| Milliseconds to adjust | number  | no       | —       | The number of milliseconds to adjust.                                                                     |
| UTC output             | boolean | no       | `false` | Whether to force UTC as the output. By default, the timezone of the input date will be used if specified. |

`Input` is the primary value (previous step output or a literal).

## Returned value

| Type     | Description                                             |
| -------- | ------------------------------------------------------- |
| `string` | Result of the Modify date with duration transformation. |

## Example

<details>
<summary>Run Modify date with duration</summary>

The date to adjust with given duration. Adjust optional parameters when the defaults do not match your payload.

1. Set **Input** to the value to transform (previous step output or a literal).

2. Review **Operator**, **Years to adjust**, **Months to adjust**, **Weeks to adjust**, **Days to adjust**, and other options and keep defaults unless your format requires otherwise.

3. Confirm **Output value** shows the transformed result.

</details>
