DateAdd()

Adds a specified time value to a date.

Availability 

Marketing Cloud Engagement ✅ Yes
Marketing Cloud Next ✅ Yes

This function became available in Marketing Cloud Next during the Summer ’26 release (API version 67.0).

Syntax 

1DateAdd(date, amountToAdd, unitToAdd)

The DateAdd() function has three parameters:

  • date (date): Required. The date to add a time value to.
  • amountToAdd (number): Required. The time value to add to the date.
  • unitToAdd (string): Required. The unit of the time value being added to the date. Accepted values: Y (years), M (months), D (days), H (hours), and MI (minutes).

Usage 

This example adds one day to the current timestamp. For the purpose of illustration, the example assumes that the current timestamp is 2023-08-05T13:41:23Z.

1%%[
2  Var @now, @later
3  Set @now = Now()
4  Set @later = DateAdd(@now, '1','D')
5]%%
6<p>The date and time one day from now will be %%=v(@later)=%%.</p>

The example outputs the timestamp for the specified date.

1The date and time one day from now will be 8/6/2023 1:41:23 PM.