# How to Calculate Fees Incurred Daily from [Date Received]

• 1
• Question
• Updated 10 months ago
I'm looking for a more elegant formula to calculate fees incurred after a certain date, then daily up to 30 days. Below is what I've put together; is there a shorter way of expressing this?"
null)"
• 192 Points

Posted 10 months ago

• 1
• 192 Points
This reply was created from a merged topic originally titled How to Calculate Fees Incurred Daily from [Date Received].

I'm looking for a more elegant formula to calculate fees incurred after a certain date, then daily up to 30 days. Below is what I've put together; is there a shorter way of expressing this?
null)
• 72,438 Points
Try this

var number DaysOverDue = ToDays(Today()-[Date Received];

If(\$DaysOverDue > 60, \$DaysOverDue - 60)
• 72,438 Points
No problem

var number DaysOverDue = Min(30, ToDays(Today()-[Date Received]);

If(\$DaysOverDue > 60, \$DaysOverDue - 60)

// the formula above will use the smaller of 30 and the # of days overdue.
• 192 Points
Sorry, it's not giving me the calculation I'm looking for. Even added the ) to the
var number DaysOverDue = Min(30, ToDays(Today()-[Date Received]))

If(\$DaysOverDue > 60, \$DaysOverDue - 60)
• 192 Points
var number DaysOverDue = Min(90, ToDays(Today()-[Date Received]));
If(\$DaysOverDue > 60, \$DaysOverDue - 60)
• 72,438 Points
OK, Very good.
(Edited)
• 192 Points
Thank you for your help good sir!
(Edited)

Ⲇanom the ultimate (Dan Diebolt), Champion

• 30,224 Points
No If() needed:
`ToDays(Today()-[Date Received]) - 60`
• 72,438 Points
I believe You still need the IF or else the days overdue will be initially negative.

Ⲇanom the ultimate (Dan Diebolt), Champion

• 30,224 Points
You are correct.