IFDATE        Conditional branch upon date comparison

Top  Previous  Next

Form 1

Syntax:

IFDATExx

[ date1 ] [ date2 ] goto  [ label ]

Forms:

IFDATE=

[ date1 ] [ date2 ] goto  [ label ]

 

IFDATE<

[ date1 ] [ date2 ] goto  [ label ]

 

IFDATE>

[ date1 ] [ date2 ] goto  [ label ]

 

IFDATE<=

[ date1 ] [ date2 ] goto  [ label ]

 

IFDATE>=

[ date1 ] [ date2 ] goto  [ label ]

 

IFDATE! =

[ date1 ] [ date2 ] goto  [ label ]

Arguments:

[ date1 ]

Variable or string defining a date in the format of mm.dd.yy

 

[ date2 ]

Variable or string defining a date in the format of mm.dd.yy

 

[ label ]

A valid label within the current script file which is branched to if the date condition is satisfied.

Options:

none

 

 

Form 2

Syntax:

IFDATE

[ cond ]  goto  [ label ]

Arguments:

[ cond ]

Variable or string defining a date condition to test against the internal %comparedate variable.

 

[ label ]

A valid label within the current script file which is branched to if the date condition is satisfied.

Options:

none

 

 

Form 3

Syntax:

IFDATExx

[ date ]  goto  [ label ]

Forms:

IFDATE=

[ date ]  goto  [ label ]

 

IFDATE<

[ date ]  goto  [ label ]

 

IFDATE>

[ date ]  goto  [ label ]

 

IFDATE<=

[ date ]  goto  [ label ]

 

IFDATE>=

[ date ]  goto  [ label ]

 

IFDATE! =

[ date ]  goto  [ label ]

Arguments:

[ date ]

Variable or string defining a date in the format of mm.dd.yy to compare against the date stamp of the file obtained with the most recent GETNEXTFILE  script command.

 

[ label ]

A valid label within the current script file which is branched to if the date condition is satisfied.

Options:

none

 

 

Form 1 of this command is used to compare two specified date strings in the format of mm.dd.yy.

 

Form 2 of this command is used in conjunction with the most recent to compare the date of the file with a specified date string.

 

Form 3 of this command is used in conjunction with the most recent GETNEXTFILE to compare the date of the file with a specified date string.

 

When specifying a date, leading zeroes are required. The following are examples of valid date strings.

 

01-30-00January 30, 2000
12-25-99December 25, 1999

 

Syntactically, no space is permitted to the left of the ‘!’, '=', '<' or '>' symbols, and a space is required to the right of these symbols.

 

Example of Form 1

 

The following conditional branch is taken if the current date is past June 30, 2003.

 

       IFDATE> %date "06-30-03" goto later date

 

Example of Form 2

 

The following conditional branch is taken if a local file just obtained with the GETNEXTFILE command has a date stamp after June 30, 2003.

 

       GETNEXTFILE "*.txt"

       IFDATE> "06-30-03" goto good file

 

Example of Form 3

 

The following conditional branch is taken if a local file just obtained with the GETNEXTFILE command has a date stamp after June 30, 2003.

 

       GETNEXTFILE "*.txt"

       IFDATE> "06-30-03" goto_good

 

Related Command(s):        GETNEXTFILE, IFSIZE, IFTIME