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
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' )
Note: Within Engage, the tstring interval must be enclosed in single quotes. Within BlueANALYZER, the tstring interval will work with or without the single quotes (although the use of single quotes is recommended for consistency).