View previous topic :: View next topic
|
Author |
Message |
poobalen
New User
Joined: 17 May 2006 Posts: 18 Location: malaysia
|
|
|
|
hi,
Is there any command to convert date from julian to greg and
form greg to julian.
Thank you for the help |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
poobalen wrote: |
Is there any command to convert date from julian to greg and
form greg to julian. |
By gerg i assume you mean Gregorian?
Yes, but name the language you are expecting to get the answer in?????? |
|
Back to top |
|
|
poobalen
New User
Joined: 17 May 2006 Posts: 18 Location: malaysia
|
|
|
|
yes it is gregorian date,,,
but i dun understand what you mean by the language
for example
if i key in 2007030
i want the system to return me in gregorian date
ddmmyyyy
is there any command for this ...or
do i need to use utility for this
Thanks for the help..... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
I believe Bill's question refers to what programming language are you coding with (COBOL, REXX, CLIST, Assembler, etc). |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
I found the following example in Google Groups:
Code: |
/* REXX */
ARG JULDATE
SAY GREGORIAN(JULDATE)
EXIT
GREGORIAN: PROCEDURE
YYYY=LEFT(ARG(1),LENGTH(ARG(1))-3)
DDD=RIGHT(ARG(1),3)
T=(YYYY//4=0)
DD=DDD; IF DD>(59+T) THEN DD=DD+2-T
MM=((DD+91)*100)%3055
DD=DD+91-(MM*3055)%100
RETURN YYYY'/'RIGHT(MM-2,2,'0')'/'RIGHT(DD,2,'0') |
You can put this REXX in your SYSEXEC library, and it will act as any TSO command.
O. |
|
Back to top |
|
|
poobalen
New User
Joined: 17 May 2006 Posts: 18 Location: malaysia
|
|
|
|
hi, im coding in cobol language..
thanks |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Quote: |
hi, im coding in cobol language.. |
Then what prompted you to post the question in TSO/ISPF section...
look at these intrinsic function to accomplish the same... and get back if any problem...
DATE-OF-INTEGER
INTEGER-OF-DAY |
|
Back to top |
|
|
poobalen
New User
Joined: 17 May 2006 Posts: 18 Location: malaysia
|
|
|
|
hi
i'm sorry to confuse everyone
actually i'm not writing a program to get
this done.
In my previous place if i type command
'tso julian ' or 'tso date'.
I will get screen to key in the dates and
when i enter i will get the answer.
But at my current place they dont have this
function, thats why i want to know other
command to do this.
Sorry once again for the mistake.
Thanks |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Isn't julian yyddd?
Haven't downloaded the LE manual yet, isn't there an LE function for this?
Code: |
j2g: yyddd > mmddyy = date of integer (integer of date (12/31/(yy-1)) + ddd)
g2j: mmddyy > yyddd = yy(date of integer (integer of date (mmddyy) - integer of date (12/31/(yy-1))) |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Please don't worry about the "mistake" - we just didn't completely understand what was asked for.
For future questions, i suggest mentioning that you had a tso funtion and at your new site it is not there. If there is a coding question, it is always a good to post it in the forum for that language (unless there is no forum for the language involved )
Now that we know what the question was, you were in the correct forum. |
|
Back to top |
|
|
|