Datetime Compare
This function block compares a given datetime against a reference datetime. The reference can be built from individual date/time parts or defaults to the current system date/time when parts are left empty. The result is a simple boolean check that you can use to control other parts of your scenario.
π₯ Inputs
Input Date(input)Provide a full datetime string in the format YYYY-MM-DD HH:MM:SS to be compared.
Year(input)Optional. Provide a year (YYYY). Leave empty to use the current year.
Month(input)Optional. Provide a month (MM). Leave empty to use the current month.
Date(input)Optional. Provide a day of month (DD). Leave empty to use the current day.
Hour(input)Optional. Provide hour (HH). Leave empty to use current hour.
Minute(input)Optional. Provide minute (MM). Leave empty to use current minute.
Second(input)Optional. Provide second (SS). Leave empty to use current second.
π€ Outputs
Boolean(output)Returns TRUE or FALSE based on the selected relation between the provided
Input Dateand the assembled reference datetime.
πΉοΈ Controls
Relation- Dropdown with comparison options:==,~=,<,<=,>=,>Choose how the two datetimes will be compared (equal, not equal, less, less or equal, greater or equal, greater).
π― Features
Easy comparison between a full datetime and a constructed reference datetime.
Reference datetime parts default to the current system date/time when left empty.
Simple boolean output suitable for logic flows, triggering actions, or logging.
βοΈ Running mechanism
The block accepts a full datetime as
Input Dateand builds a reference datetime from the individual part inputs (Year,Month,Date,Hour,Minute,Second).Any part left empty uses the current system value for that part.
The block compares the two datetimes using the selected
Relationcontrol and emits a boolean result.
π Usage instructions
Provide a full datetime string to
Input Datein the format YYYY-MM-DD HH:MM:SS.Optionally fill any of
Year,Month,Date,Hour,Minute,Secondto form a custom reference. Leave fields empty to use the current system values for those parts.Select the comparison operator in the
Relationdropdown.Use the boolean output to drive logic, triggers, or logging blocks.
π‘ Tips and Tricks
Combine with
Date-Timeto easily obtain the current datetime string and feed it intoInput Datefor quick checks.Use
Date-Time Listwhen you want to supply each datetime part from a prebuilt list rather than individual inputs.Use
String Inputto let an operator type a custom datetime at runtime.Connect the boolean output to
Logic Inputor other logic blocks (for exampleAnd,Or) to build time-based control flows.Log matches or events by connecting the result to
CSV ExportorImage Loggerfor audit trails.Use
Debug Inputto inspect intermediate values while building your scenario.
π οΈ Troubleshooting
If comparisons behave unexpectedly, ensure
Input Datematches the required format YYYY-MM-DD HH:MM:SS.If a part input is empty, the block uses the current system value for that partβverify that this is intended.
If you need only a date-level comparison (ignore time), set time parts to zeros or ensure both sides use consistent precision.
Last updated
Was this helpful?