HP3000-L Archives

February 2006, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Walter Murray <[log in to unmask]>
Reply To:
Walter Murray <[log in to unmask]>
Date:
Thu, 9 Feb 2006 23:34:01 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (45 lines)
In an earlier posting, I wondered aloud whether there were a rigorous
definition of the difference between two dates, in years, months, and
days.

I did check ISO 8601, which is a standard for date representation.  It
did state one requirement to be met when expressing a time period in
years, months, and days:  months must not be greater than 11, and days
must not be greater than 30.  That's all I could find.

Walter  


-----Original Message-----
From: HP-3000 Systems Discussion [mailto:[log in to unmask]] On
Behalf Of Eben Yong
Sent: Wednesday, February 08, 2006 1:44 PM
To: [log in to unmask]
Subject: [HP3000-L] HP COBOL routine to calculate the difference between
2 dates

I'm slightly embarrassed to even post this question, as I feel I should
be 
able to produce this code in a snap, but for some reason my brain must
be 
somewhat tired today.  In any event, excuses aside, here is the
question:

Would someone pls share their COBOL code that will calculate the 
difference between two given dates, and return the results in terms of 
years, months, and days?

For example, the difference between 20060125 and 20040611 is 1 year 7 
months and 14 days.  

Care to share?  
Thanks as always,
Eben Yong
Health Plan of San Mateo

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2