Job Runner

If Comparing Two Dates Satisfies Conditions

Summary

Compare two dates.

How to Use

This condition is combined with other “when to execute” conditions.

For example, it is possible to check whether the “End Date” is within one month of the “Start Date.” You can set it to perform actions when this condition is met.

Parameter

Set Comparing Date (A), Criteria, Comparing Date (B), Value to be Added to Date (B), and Calculate Type.

With these five parameters, you can express conditions such as:

A >= B + 1 month

and to set it as conditions.

If either “Comparison Date (A)” or “Comparison Date (B)” is empty, an error will occur at runtime.

Comparison Date (A)

Enter the date data to be compared.

To access the value of a Date field or a Date and time field, use the field code:

=Date_2

Remember to use an equals sign (=) before the field code to access the value of that field.

To specify the current date, enter

=today()

This will set the current date as the value of this parameter.

Criteria

Select comparison conditions.

The subject will be “A”. For example, if you choose “Greater than”, the condition will be “If A is greater than than B”.

Here, “greater than” means “more future.”

Comparison date (B)

Enter the date data to be compared.

The input method for referencing the values of date fields and datetime fields is the same as “Comparison Date (A).”

Value to be Added to Date (B)

To add or subtract days or months to “Comparison date (B)” and then compare it with “Comparison Date (A)”, enter that value.

For example, to add three months to “Comparison Date (B),” click the “Calculate Type” parameter, select “X Months After” in the menu, and enter the value “3” in the “Value to be Added to Date (B)” parameter.

You can also use negative values. For example, if you set “Value to Add or Subtract to B” to “-3” and “Calculation Type (B)” to “X Months After”, the calculation will return the date three months before “Comparison Date (B)”.

To compare Comparison Date (B) without calculating it as is, do not input anything.

If the selection for “Calculation Content (B)” is “Do Not Calculate”, the value entered here will not be used.

Calculate Type

To compare Comparison Date (A) after adding or removing the number of days or months against Comparison Date (B), you will select that unit.

Handling of time

When specifying time-stamped data for Comparison Date (A) or Comparison Date (B), the date will be the date viewed in the time zone set by “Set Time Zone”. If “Set Time Zone” is not set, it will be considered Japan Time.

The time part is not taken into account during comparison. For example, when specifying “If Comparison Date (A) is greater than Comparison Date (B)”, if Comparison Date (A) is 2018-11-10 12:00 and Comparison Date (B) is 2018-11-10 11:00, looking at the time part, Comparison Date (B) is “greater”. However, since the time part is ignored and considered “the same day”, the condition of “greater” is not satisfied.

Condition Inverter

Clicking the Condition Inverter will change the condition to “If comparing two dates does not satisfy conditions.”

“If comparing two dates does not satisfy conditions” will execute actions when the condition of the comparison result is not met.