> For the complete documentation index, see [llms.txt](https://docs.tabula.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tabula.io/data-transformation/formulas/date-and-time-functions/dateadd2.md).

# DateAdd2

Adds the specified value for the specified date or time part to a string representation of a date, time, or datetime.

```wolfram
DateAdd2(dateTimeString, value, datePart) → modifiedDateTimeString
```

#### Inputs

* `dateTimeString` - A string representing a date, time, or datetime value.
* `value` - The number of units of time that you want to add.
* `datePart` - The units of time that you want to add, ex. `DateValueOption.DAY`.

**Examples**

```wolfram
DateAdd2("2021-01-04", 2, DateValueOption.MONTH) → "2021-03-04"
DateAdd2("2023-01-30", 7, DateValueOption.DAY) → "2023-02-06"
DateAdd2("15:30:00", 1, DateValueOption.HOUR) → "16:30:00"
DateAdd2("2023-10-15 12:45:30", -5, DateValueOption.MINUTE) → "2023-10-15 12:40:30"
```
