View previous topic :: View next topic
|
Author |
Message |
Suganya87
New User
Joined: 09 May 2016 Posts: 12 Location: India
|
|
|
|
Hi ,
I need ( Year + Today's Julian date ) for an example if Julian date of today is 230 then I need 2016230 as my output.
I Tried Julian_Day but it gave integer value from 1472 B.C .
Can anyone tel me how to achieve this. |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Here is one possibility:
Code: |
COMPUTE INTEGER-DATE = FUNCTION INTEGER-OF-DATE (DATE-YYYYMMDD)
COMPUTE JULIAN-DATE = FUNCTION DAY-OF-INTEGER (INTEGER-DATE) |
Shorter version:
Code: |
COMPUTE JULIAN-DATE = FUNCTION
DAY-OF-INTEGER ( FUNCTION INTEGER-OF-DATE(DATE-YYYYMMDD) ) |
|
|
Back to top |
|
|
Suganya87
New User
Joined: 09 May 2016 Posts: 12 Location: India
|
|
|
|
Hi Marso,
Sorry I need in SQL format , not cobol code. |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Grrrrrrrrr |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Then why post in the COBOL programming section and not the DB2 section? Locking. |
|
Back to top |
|
|
|