Results 1 to 2 of 2

Thread: Interest Rate

  1. #1
    Join Date
    Oct 2003

    Unanswered: Interest Rate

    I am creating a budget database for personal use...I am trying to create a calculation that will calculate and add my interest automatically.

    I am new to sql(about a week of reading] but I think it would look something like

    select [interestrate], [interestrate] / 12 / [days of month] as periodic rate, [balance] * [periodicrate] as interest from budget;

    My syntax is probably all messed up but I usually have to feel my way through sql, just wanted to show that I am not a total slacker.

    How do I automatically put in the days of the month since the number of the days in the month are a part of the calc.

    can I reference to a calculation (periodic rate) that I just made

    I dont know if this is possible in sql ....just went that way because I know nothing about vb.
    Last edited by slacker73; 10-26-03 at 17:24.

  2. #2
    Join Date
    Oct 2003
    You could use the day function...

    If you want the number of days in the current month:
    day(dateadd("d",-1,Dateadd("m",1,cdate(format(date(),"yyyy/mm/dd") & "/" & "01")))))

    I am sure you could use these same functions to make it smaller and easier to understand, but within 2 min...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts