IFDATETIME        Conditional branch upon date time comparison

<< Click to Display Table of Contents >>

Navigation:  Robo-FTP User's Guide > Script Programming > Script Commands > All Script Commands >

IFDATETIME        Conditional branch upon date time comparison

Syntax:

IFDATETIMExx

[ date1 ] [ date2 ] GOTO  [ label ]

Forms:

IFDATETIME=

[ date1 ] [ date2 ] GOTO  [ label ]

 

IFDATETIME<

[ date1 ] [ date2 ] GOTO  [ label ]

 

IFDATETIME>

[ date1 ] [ date2 ] GOTO  [ label ]

 

IFDATETIME<=

[ date1 ] [ date2 ] GOTO  [ label ]

 

IFDATETIME>=

[ date1 ] [ date2 ] GOTO  [ label ]

 

IFDATETIME!=

[ date1 ] [ date2 ] GOTO  [ label ]

Arguments:

[ date1 ]

Variable or string containing the formatted date and time string in the format of Sat Feb 16 11.00.22 2013.

 

[ date2 ]

Variable or string containing the formatted date and time string in the format of Sat Feb 16 11.00.22 2013.

 

[ label ]

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

Options:

none

 

 

 

This command is used to compare two specified date and time strings in the format of Sat Feb 16 11.00.22 2013.

 

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

 

Sun Jan 30 11.43.02 2000January 30, 2000 11:43:02 AM
Sat Dec 25 18.12.37 1999December 25, 1999 6:12:37 PM

 

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

 

The following conditional branch is taken if the current date is past June 21, 2013 12:00:00 AM.

 

IFDATETIME> %datetime "Fri Jun 21 12.00.00 2013" GOTO later date

 

 

Related command(s): IFDATE, IFTIME, DATETIMEADD, DATETIMESUB, FILECOMPARETO, FILECOMPAREFROM

See also: Comparing Local and Remote Files, Comparing File Dates and Times, Using the %date, %datetime, and %time Variables