|Re: hp 17bii+ dates calculation...|
Message #6 Posted by JoePaul on 14 July 2013, 2:26 a.m.,
in response to message #5 by Katie Wasserman
Thank you for that solver equation! It works as intended. When writing lease agreements, I subtract 1 day from the move in date.
e.g.) Tenant moves in 14 July 2013 for 9 months. The lease end date is 1 day less than 9 months from the move in date (i.e. 13 April 2014).
Using your solver equation, I can easily account for this by subtracting 1 from the result shown.
Im sure it's possible to subtract 1 from the result (automatically) or to have a conditional expression that determines when long periods (e.g. 76, 120) apply and not to subtract 1 in this instance. Surprisingly, when using 80 months it adds a day!
p.s Leap years aren't an issue (I ignore them).
The example I used is:
months=60 (5 years)
date2=15.03202 (calculated - implies 15.032020)
months=120 (10 years)
Edited: 14 July 2013, 5:45 a.m.