AddDaysToDate (open)
Adds a number of days to a date, and returns the new timestamp
Syntax
LOADLIB "wh::datetime.whlib";
DATETIME FUNCTION AddDaysToDate(INTEGER add_days, DATETIME date)
Parameters
INTEGER add_days
The number of days to add to the timestamp. This value can also be negative.
DATETIME date
The timestamp to add the days to
Return value
DATETIME
A DateTime value representing @italic date to which @italic add_days has been added
Description
This function can for example be useful to calculate expiration dates of documents or users.
Examples
// Add 20 days to the current date
INTEGER extradays := 20;
DATETIME newdate := AddDaysToDate(extradays, GetCurrentDateTime());