Subject: | |
From: | |
Reply To: | |
Date: | Wed, 19 Jan 2000 16:30:49 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
There are lots of ways to do this, but one the easiest (for me, anyway) is
the new COBOL date functions INTEGER-OF-DATE and DATE-OF-INTEGER. The first
converts an 8-digit date (in CCYYMMDD format) to an integer. You can then
add (or subtract) any number of days (within reason). Then pass the result
through DATE-OF-INTEGER which will convert it back to CCYYMMDD.
Clean and simple.
Even for me.
Jim Phillips Manager of Information Systems
E-Mail: [log in to unmask] Therm-O-Link, Inc.
Phone: (330) 527-2124 P. O. Box 285
Fax: (330) 527-2123 Garrettsville, Ohio 44231
----- Original Message -----
From: Joe Smith <[log in to unmask]>
To: <[log in to unmask]>
Sent: Wednesday, January 19, 2000 3:51 PM
Subject: [HP3000-L] Date routines, adding to current date
> I just got a question on date calculations from one of our Cobol
programmers,
> but its been a long time since I used the calendar / date intrinsics.
> Basically, the programmer wants to display the current date in the format
> mm/dd/yy and then do a calculation of the current date + nn days, then
display
> the revised date in the same format.
>
> This is a work scheduling application that has been in production for some
time,
> and it failed in the Y2K (they just found out). The process they used
before
> was rather unbelievable, they calculated the julian date and did all
> manipulations without using any intrinsics. It is quite hard to follow.
They
> want to get it right this time, so any help would be appreciated.
|
|
|