DateAdd

Changes the specified date by the specified interval and number; for example, by adding three days.

Syntax

DateAdd(Interval, N, Date)

Parameters

Interval

The time interval to change the Date by. This parameter supports the following values:

  • yyyy: year
  • q: quarter
  • m: month
  • y: day of year
  • d: day
  • w: weekday
  • ww: week
  • h: hour
  • n: minute
  • s: second
N
The number of Interval to add to the Date; for example, three days. This value may be positive or negative.
Date
The date to change by the specified Interval and number.

Example

The following example subtracts one day from 2007-07-05:

[DateCustom].[DateInt].[DayInt].&[`Year("2007-07-05T12:30:10")`]&[`Month("2007-07-05T12:30:10")`]&[`Day(DateAdd("d",-1,"2007-07-05T12:30:10"))`]