Compare two dates and choose the closest value to zero

I just compare Date&time difference two dates and I just find out how to get closest value to zero.
I have 4, and -243 so give me 4

You can do this with a Math Formula node:

if (abs($value1$) < abs($value2$), $value1$, $value2$)

Here’s an example:

– Philipp


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