MS Access 中的 IPmt() 函數用於返回一個雙精度值,指定基於定期、固定支付和固定利率的給定年金期間的利息支付。
用法:
IPmt (rate, per, nper, pv [, fv ] [, type ])
參數:此方法接受語法中的六個參數,如上所述和如下所述:
- rate:它以 Double 指定每期利率。如果年利率 (APR) 為 5% 且按月付款,則每期的費率為 0.05/12。
- per:它在 Double 中指定 1 到 nper 範圍內的付款期。
- nper:它以 Double 形式指定年金中的付款期總數。例如,如果 five-year 汽車貸款按月還款,則該貸款總共有 5 * 12 = 60 個還款期。
- pv:它在 Double 中指定了一係列未來付款或收款的現值或今天的價值。
- fv:它是可選的。在您完成最後付款後,它確定您想要的未來價值或現金餘額。默認值為 0。
- type:它是可選的。它指定付款的到期時間。如果付款在付款期末到期,則使用 0,如果付款在期初到期,則使用 1。如果省略,則假定為 0。
返回值:它以指定利息支付的雙倍形式返回。
注意:必須使用以相同單位表示的付款期來計算 rate 和 nper 參數。例如,如果利率是用月計算的,nper 也必須用月來計算。示例-1:以 10 per of Rs 支付的利息。當年率為 8 % 且 TermInYears 為 5 時為 100000。
SELECT IPMT(0.08/12, 10, 5*12, -100000, 0, 0) AS Interest_Paid ;
輸出:
Interest_Paid |
---|
582.796530417576 |
示例-2:
賬戶表中每個 account-id 的利息支付計算。
表-帳戶
帳戶ID | 貸款額度 | 年利率 | 年限 |
---|---|---|---|
11001 | 100000 | 0.10 | 5 |
11002 | 120000 | 0.10 | 6 |
11003 | 150000 | 0.10 | 4 |
11004 | 900000 | 0.10 | 6 |
SELECT IPMT([AnnualRate]/12, 10, [TermInYears]*12, -[LoanAmount], 0, 0) AS INTPaid FROM Accounts;
輸出:
支付寶 |
---|
733.18850390563 |
905.149502978079 |
1051.90923080389 |
6788.62127233559 |
相關用法
- MS Access Hex()、Oct()用法及代碼示例
- MS Access SLN()、SYD()用法及代碼示例
- MS Access DDB()、FV()用法及代碼示例
- MS Access Val()、Sum()用法及代碼示例
- MS Access Sgn()、Sqr()用法及代碼示例
- MS Access StrConv()、StrReverse()用法及代碼示例
- MS Access Year()用法及代碼示例
- MS Access Chr()、Asc()用法及代碼示例
- MS Access InStr()、InstrRev()用法及代碼示例
- MS Access LCase()、UCase()用法及代碼示例
- MS Access Str()、StrComp()用法及代碼示例
- MS Access Replace()、Space()用法及代碼示例
- MS Access Exp()、Count()用法及代碼示例
- MS Access Mid()、Len()用法及代碼示例
- MS Access Atn()、Cos()用法及代碼示例
- MS Access LTrim()、RTrim()用法及代碼示例
- MS Access Left()、Right()用法及代碼示例
- MS Access Max()、Min()用法及代碼示例
- MS Access Fix()、Format()用法及代碼示例
- MS Access Second()、Time()用法及代碼示例
- MS Access MonthName()、Now()用法及代碼示例
- MS Access Month()、Minute()用法及代碼示例
- MS Access Day()、Hour()用法及代碼示例
注:本文由純淨天空篩選整理自nitin_sharma大神的英文原創作品 IPmt() Function in MS Access。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。