DATESUB Subtract specified number of days from a date variable |
Top Previous Next |
This script command is used to subtract a specified number of days from a date variable.
Consider the example below where 14 days is subtract from a variable containing the current date.
SET today = %date DATESUB today 14
The number of days to subtract may also be expressed in a variable as shown below.
SET today = %date SETNUM SETdays = 14 DATESUB today days
The %date internal variable may not be used in this command directly.
Related Command(s): DATEADD See also: Using the %date, %datetime, and %time Variables
|