How to use Duration (Date-based) in Rule Engine

Hi, I’m using the newest version of the Date&Time Difference node which return a Duration (Date-based) data type (before it returned a number).

Is it possible to use that column in a rule engine like $duration_column$ < 3 => “Something” without converting to number?

image

1 Like

Welcome aboard!
The D&T Difference node can output numbers directly. Just set the output type to “Number”. Otherwise the data-type is “Date&Time Difference” (like in your screenshot). Rule engine clearly states for comparison: “For numerical values” and “For string values” and “D&T Diff” is neither one, so no.

4 Likes

Hi welcome @angel_g! Yes unfortunately as @McReady said Rule Engine can only handle strings and numerical values. I’m not aware of it being stated anywhere clearly though. Where does it say that @McReady?

I recommend trying the expression and expression row filter nodes instead. They are modern, feature rich, and can handle a wide range of data including just recently added support for date/time and durations. The rule engine and rule-based filter is archaic, I expect it will be deprecated in 12 months.

2 Likes

@Nick_Reader It’s within the RE, in the in-node description of each comparison.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.