I think this is what you're asking.
Here is a query that compares when a payment is made against the due date using the DateDiff function. If the DateDiff function returns a negative number (which means the payment was before the due date) then no penalty is required. However, if the DateDiff...