Post Reply 
How many Years Months and Days ?
03-08-2015, 08:14 PM (This post was last modified: 03-08-2015 08:15 PM by Dieter.)
Post: #2
RE: How many Years Months and Days ?
(03-08-2015 06:57 PM)ggauny@live.fr Wrote:  Lbl YMD 365.2564 / FIX1 INT LASTx FRC 365.2564 * 30.44 / INT LASTx FRC 30.44
* FIX0.
Enter the number days between 2 dates, XEQ YMD.
YEARS are in Z, MONTHS in Y, and DAYS in X.

Ex: 23389 (days) XEQ YMD -----> 64y 0m 13d.

Ah, very interesting. May I ask a few questions?
  1. Let's try some sample cases:
    Example A: Add 23389 days to 1 Jan 1900 and you'll get 15 Jan 1964. That's 64 years and 14 days.
    Example B: Add 23389 days to 1 Mar 1900 and you'll get 14 Mar 1964. That's 64 years and 13 days.
    Example C: the program translates 365 days into 0 years, 11 months and 30(,16) days.
    That's why I think you cannot consistently translate a given number of days into years, months and days.
  2. The program multiplies by 365,2564 and then divides by 30,44. This is equivalent to a multiplication by 11,9992. Is this supposed to be 12? The formula sounds interesting, but is there any proof?
  3. The program first sets FIX 1 and finally FIX 0. What's the purpose of this? If the last result (number of days) should be rounded to the next integer, you can simply add a final 0,5 [+] [INT].

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: How many Years Months and Days ? - Dieter - 03-08-2015 08:14 PM



User(s) browsing this thread: 1 Guest(s)