DATEADD

Adds a time interval to the input date. The number and type of intervals are specified by the Numeric_Value and Tstring_Interval arguments.

DATEADD ( <date_field or date>, <numeric value>, <tstring interval> )
  • date_field or date: A date field or value be used in the calculation.
  • numeric_value: The number of intervals to add to the date supplied.
  • tstring interval: The size of interval to add.
    • S = Seconds
    • N = Minutes
    • H = Hours
    • D = Days
    • W = Weeks
    • M = Months
    • Q = Quarters
    • Y = Years

Note: dates in Audiences need to be formatted as either YYYY-MM-DD or MM/DD/YYYY. Entering a date as 01-02-2023 would be read as Jan-2 not 1-Feb.

Example: create a field on the CUSTOMER table to give the return date of a customer when supplied with the departure date and the number of nights on their holiday.

DATEADD( [CUSTOMER.HOLIDAY_DEPARTURE_DATE], [CUSTOMER.NUMBER_OF_NIGHTS], 'D' )