DATEADD
|
Syntax: |
DATEADD(<Date>,<Number of Days>)
|
||||
|
|
|
||||
|
Meaning: |
Adds <Number of Days> to the date
<Date> and returns the new date as value. <Number
of Days> can also be negative. DATEADD returns as value the date increased
or decreased by <Number of Days. <Date> must be a valid date in the
form YYYYMMDD or YYMMDD, otherwise DATEADD returns the value –1. The returned
date again is a valid date in the form YYYYMMDD or YYJMMDD. |
||||
|
Parameter: |
|
||||
|
Sample: |
IN_14_DAYS% = DATEADD(NUMDATE(DATEG8$),14) 14_DAYS_AGO% = DATEADD(NUMDATE(DATEG8$),-14) DATEADD can be used to test whether a date is
valid. IF DATEADD(DATUM%,0)
<> -1 THEN ... /*
Date is valid ELSE .. . /*
Date is invalid ENDIF |
||||
|
See also: |
|