The CompareDateGen Generator compares two dates using [EQ, NE, LT, LTE, GT, or GTE] and returns a Boolean result. 


The following parameters may be configured for the CompareDateGen Generator. Items with an asterisk* are required. 

  • dateFormat* - Defines the date format to be parsed.

  • operator* - Defines the type of compare operation that will be taken on the two strings.
    • EQ - Equal To
    • NE - Not Equal To
    • LT - Less Than
    • GT - Greater Than
    • LTE - Less Than or Equal To
    • GTE - Greater Than or Equal To

  • value1* - Defines the first date string to compare.

  • value2* - Defines the second date string to compare.

Example: Compare Two Dates using the Less Than Operator

For this example, two FlexibleDateRangeGen Generators have been added as Linked Generators and will generate the dates that will be compared. 



Note: Please note that Attributes may also be referenced for the value1 and value2 Parameters. This example uses Linked Generators to provide a simple use case. 

The CompareDateGen Generator references the two FlexibleDateRangeGen Generators: 

Sample Output

For this example, a boolean value of "true" will be generated each time date1 is less than or equal to date2. A boolean value of "false" will be generated when date1 is greater than date2.