GREATEST(({today} - {duedate}), 0)
# general
b
GREATEST(({today} - {duedate}), 0)