View previous topic :: View next topic |
Author |
Message |
Meena Beginner
Joined: 03 Aug 2004 Posts: 20 Topics: 15
|
Posted: Fri Aug 20, 2004 2:06 am Post subject: Sql for getting the julian date |
|
|
Can i get the julian date of current date , iam not mentioning the date got using the JULIAN_DAY function.
I know we can use the INTEGER-OF-DATE and INTEGER-OF-DAY functions in cobol , but i need the retreive the same in a select query while executing in spufi.
Can anyone help me??
Thanks
Meena |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Fri Aug 20, 2004 5:42 am Post subject: |
|
|
Meena,
There are many number of ways of getting the desired results.
try these
Code: |
SELECT CAST( YEAR(CURRENT DATE) * 1000
+ DAYOFYEAR(CURRENT DATE) AS CHAR(7))
FROM SYSIBM.SYSDUMMY1
;
|
This will produce
Code: |
SELECT SUBSTR(CHAR(YEAR(CURRENT DATE)),3,2) CONCAT
SUBSTR(CHAR(DAYOFYEAR(CURRENT DATE)),1,3)
FROM SYSIBM.SYSDUMMY1
;
|
This will produce
Hope this helps...
Cheers
kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
|
|