Finance Charge Computation

I am trying to create a statement to send to customers.
I would like the statement to include a finance charge.
The underlying recordset of my report returns a row for each outstanding invoice.

The finance charge computation is like this for each line:
   BalanceDue * (InvoiceDate - CurrentDate) \ 30 * MonthlyInterestRate
      (I would like to use integer division if possible - hence the backslash before the 30)

I'm not sure how to do this inside an SQL statement (or if it can be done). I need to get it back with my recordset so that my report writer (MS Access) can total it.

The main issues:
1. How to include the computation overall - can something this complex be done?
2. How to get the date difference in DAYS (not microseconds since 1900, or however it stores it).
3. How to refer to CurrentDate.
4. Can integer division be used?

Thanks very much.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Anthony PerkinsCommented:
1. Yes.
2. Use the DATEDIFF() function with "day" as the DatePart.
3. Use the GETDATE() function.
4. Yes, but not with "\".  Use the CAST function to convert to an integer as in:
       BalanceDue * CAST(InvoiceDate - CurrentDate As Integer) / 30 * MonthlyInterestRate

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.