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:
Wed, 8 Feb 2006 21:30:14 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (23 lines)
Eben Yong asks:

> 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?

I don't even know how to define the difference, in view of the fact that
not all months have the same number of days.

For example, what is the difference between 2005-07-30 and 2006-09-01?
Is it 1 year + 1 month + 1 day?  Or 1 year + 1 month + 2 days?

I wonder if there's a standard that defines this.  It might be in ISO
8601.  I'll check at work tomorrow.

Walter  

Walter J. Murray

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

ATOM RSS1 RSS2