DATEADD        Add specified number of days to date variable

Top  Previous  Next

Syntax:

DATEADD

[ variable ] [ const ]

Arguments:

[ variable ]

A variable containing a date in the format of mm-dd-yy.

 

[ const ]

A variable or a numeric constant representing the number of days to add to the date contained in [ variable ].

Options:

none

 

 

 

This script command is used to add a specified number of days to date variable.

 

Consider the example below where 14 days is added to a variable containing current date.

 

SET today = %date

DATEADD today 14

 

The number of days to add may also be expressed in a variable as shown below.

 

SET today = %date

SETNUM SETdays = 14

DATEADD today days

 

The %date internal variable may not be used in this command directly.

 

Related Command(s): DATESUB

See also: Using the %date, %datetime, and %time Variables