Compare Dates
Compare 2 dates (each stored in variables) and determine whether one is before, after, or equal to the other.
Each date parameter (day, month, year) must be stored in its own variable. Therefore, when using this command, you are working with a total of 6 variables – 3 variables for each of the 2 dates being compared.
To learn more about the correct formats for these variables, see A NOTE ABOUT FORMATTING.
-
For the first of the 2 dates to be compared: Enter the names of the variables in which each of the individual date parameters is stored.
-
For the second of the 2 dates to be compared: Enter the names of the variables in which each of the individual date parameters is stored.
-
Select whether you'd like to check if the date in column 1 is before, after, or equal to the date in column 2.
-
Enter the name of the variable into which you'd like to place the result. (The result will be either TRUE or FALSE, as applicable.)
-
Instruct the wizard how to handle any errors encountered. Read more about error handling.
Let's say your insurance company needs to notify all customers whose policies have elapsed. You can use the compare dates command to compare whether the current date is after the expiration date of the policy and send notices only to those customers for whom this comparison is TRUE.