Keragon’s Compare Datetimes action allows you to easily compare two datetime values and determine their relationship. This is useful for validating deadlines, checking if events occurred before or after a specific time, and automating date-based logic in your workflows.
How to Use the Compare Datetimes Helper
-
Open your workflow editor.
-
Click the + icon to add a new step.
-
In the step selection panel, click "Helpers".
-
From the Helpers options, select "Date and Time Helpers".
-
Choose the "Compare Datetimes" action.
-
Click the Start Date field.
-
Use the Variable Selector to map the start datetime value.
-
Click the End Date field.
-
Use the Variable Selector to map the end datetime value.
-
Set the Start Date Format field to match the format of the input start datetime.
-
Set the End Date Format field to match the format of the input end datetime.
-
(Optional) Set the timezones for Start Date Timezone and End Date Timezone fields. Defaults to UTC.
-
Click "Save" to apply changes.
-
Click "Test Step" to preview the result.
-
Go to the Outputs tab to view the comparison result.
Output Values:
-
-1
: Start Date is before End Date. -
0
: Start Date is equal to End Date. -
1
: Start Date is after End Date.
Example Result:
-
Start Date:
"2024-07-01T10:00:00Z"
-
End Date:
"2024-07-05T10:00:00Z"
-
Output:
-1
(Start Date is before End Date)