Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change Julian Date to Gregorian date ideas?

Status
Not open for further replies.

wolves

Programmer
Jan 26, 2001
130
US
Need to change Julian Date to Gregorian Date.

Ex:
Julian date 04210 = gregorian date 072804.

On a mainframe computer. Any ideas?

Not sure how to go out and convert the dates.
 
If by "mainframe compiler" you are talking about a currently supported IBM compiler (or any other maintrame compiler that supports the '89 Standard Intrinsic Functions),

you can use the
INTEGER-of-DAY to get an integer from a YYYYDDD date

and use
DATE-of-INTEGER to get the date in YYYYMMDD format from that integer.

See:

for example code.

Bill Klein
 
Depending on the version of COBOL you are using you can use the LE Callable Service routine "CEEDAYS", to convert the julian-date format to a lilian-date, followed by "CEEDATE", which will convert a lilian-date to a gregorian-date format (as well as many other formats).
 
On all Mainframes and PC's I have worked on
accept data-name from date. yields yymmdd.
then just move the data around.
Bob
 
ShadowFox333,
The question is not how to get today's date in Julian vs Gregorian - it is how to CONVERT a specific (random) date from one to another.

Bill Klein
 
thx all. great ideas. I went with WMK's suggestion and it seems fin.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top