Command Reference : String and Date Function Reference
  
 
@dateadd
Syntax: @dateadd(d, offset, u]
Argument 1: date number, d
Argument 2: number of time units, offset
Argument 3: time unit, u
Return: date number
Returns the date number given by d offset by offset time units as specified by the time unit string u.
The valid time unit string values are: “A” or “Y” (annual), “S” (semi-annual), “Q” (quarters), “MM” (months), “WW” (weeks), “DD” (days), “B” (business days), “HH” (hours), “MI” (minutes), “SS” (seconds).
Example:
Suppose that the value of d is 730088.0 (midnight, December 1, 1999). Then we can add and subtract 10 days from the date by using the functions
@dateadd(730088.0, 10, "dd")
@dateadd(730088.0, -10, "dd")
which return 730098.0 (December 11, 1999) and (730078.0) (November 21, 1999). Note that these results could have been obtained by taking the original numeric value plus or minus 10.
To add 5 weeks to the existing date, simply specify “W” or “WW” as the time unit string:
@dateadd(730088.0, 5, "ww")
returns 730123.0 (January 5, 2000).
The valid time unit string values are: “A” or “Y” (annual), “S” (semi-annual), “Q” (quarters), “MM” (months), “WW” (weeks), “DD” (days), “B” (business days), “HH” (hours), “MI” (minutes), “SS” (seconds).