Simple Interest
|
05-17-2015, 03:10 PM
(This post was last modified: 05-17-2015 03:12 PM by salvomic.)
Post: #1
|
|||
|
|||
Simple Interest
hi all,
to try DDAYS, I'm making a program to calc simple interest. This program works but has two problems related to DDAYS: first: I must calc the interest both for actual period and for financial, but DDAYS (as it is) calculates only for actual period (365 days and month of various duration), not for financial year (360 days and months all of 30 days)... Any help appreciated. Second problem is related to input: I used dropdown menus for days and months (not for year), but if months menu has 12 items, also if days menu has 31, it shows always only 12 also: there is a limit, using more than one dropdown menu or is the problem different? A dirty solution would be use a textbook instead, but I'm curious about that problem with dropdown... Please, help Salvo Code:
∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib |
|||
05-17-2015, 04:40 PM
(This post was last modified: 05-17-2015 04:52 PM by salvomic.)
Post: #2
|
|||
|
|||
RE: Simple Interest
...a first formula per financial year could be:
30*(mm2-mm1)+dd2-dd1 is from 13 May 2015 to 21 November 2015 there are 192 actual days (DDAYS(2015.0513, 2015.1121)), but only 188 "financial" days: 30*(11-5)+21-13 This formula *should* works independently of leap year... to be continued... ∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib |
|||
05-17-2015, 07:48 PM
(This post was last modified: 05-17-2015 09:51 PM by salvomic.)
Post: #3
|
|||
|
|||
RE: Simple Interest
this version works better:
changed type of input for days: no more checkbox, but textbox; added a function to calculate financial difference of dates (360 days/year): 30*(mm2-mm1)+dd2-dd1 It set Fixed 2 Digits format (almost a standard in Finance). I need still a better control of error, as i.e. DDAYS gives error with non existent days (try DDAYS(2015.0201, 2015.0229) for example: 29 Feb doesn't exist, and the function gives error, so the program exit with "Error: Invalid input"... Another thing a bit strange: if the order of input is: dd1 (textbox), mm1 (checkbox), yy1 (textbox) ... why the cursor goes from dd1 to yy1 and then to mm1 (in the same line)? Code:
∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib |
|||
05-18-2015, 01:59 PM
(This post was last modified: 05-19-2015 03:33 PM by salvomic.)
Post: #4
|
|||
|
|||
RE: Simple Interest
A relative complete version (that has also the inverse formulas for n, r, PV) in the HP Prime Software Library of the Forum.
∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)