daysBetween([%CurrentDateTime%], $dueDate)
(See also the documentation)
This returns a float
value, so you'd probably want to use either round()
, ceiling()
or floor()
(depending on how you want to count partial days) on the result to get an integer value.
You can subtract the current date from the due date with the 'trimToDays' function.