Applies to Infiniti v8.1 or later
 
 
Returns a date that is the result of adding days, months or years to a particular date.

Usage

DateAdd( t, n, d )

Parameters

Parameter Description
t

Time interval for comparison, e.g. years. Valid values:

Day = 4
DayOfYear = 3
Month = 2
Quarter = 1
Weekday = 6
WeekOfYear = 5
Year = 0
Hour = 7
Minute = 8
Second = 9
n

Number of units to be added e.g. 14 days

d Date value for additon. If this value is hard-coded it must be prefixed and suffixed with a hash (#) character, e.g. #25/12/2020#.

Example

Calculate a due date: This example shows the DateAdd function being used to calculate a due date.
DateAdd(4,30,[q4.Date])

The parameters passed in do the following:

4 Time interval of “Days” to ensure we are adding days to the date.
30

Number of days to be added the date

[q4.date]

References question with ID 4 and the answer named “date”. This will contain the original date value – e.g. a hire date or invoice date.

 

Assuming the referenced question resolves to a value of 01/01/2020, the result of the DateAdd() will be 31/01/2020.

Related Articles

 

Keywords

 

dateadd function days calculate dateadd() dateformat

date addition functions