-
Julian Date
I want to get the julian date number for today. Today's julian date number is 127. How do I get oracle to return this number to me??
-
select to_number(to_char(sysdate, 'DDD')) from dual
"The power of instruction is seldom of much efficacy except in those happy dispositions where it is almost superfluous" - Gibbon, quoted by R.P.Feynman
-
Code:
SQL> select to_char(sysdate,'J')
2 from dual;
TO_CHAR
-------
2452767
HTH
Jim
Oracle Certified Professional
"Build your reputation by helping other people build theirs."
"Sarcasm may be the lowest form of wit but its still funny"
Click HERE to vist my website!
-
Re: Julian Date
Originally posted by lesstjm
I want to get the julian date number for today. Today's julian date number is 127. How do I get oracle to return this number to me??
What do you mean by Julian date? According to Oracle's application of Julian's callendar today's date number is 2452767, not 127!
Code:
SQL> SELECT TO_CHAR(SYSDATE,'J') FROM dual;
TO_CHAR
-------
2452767
What you actualy mean is probably to get the today's day of the year number. For this you can use TO_CHAR() with 'DDD' format mask.
Code:
SQL> SELECT TO_CHAR(SYSDATE,'DDD') FROM dual;
TO_
---
127
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
-
Confusion here . . . IBM used to call a date YYDDD, "Julian" format . . . I'm sure Big Blue knows best.
"The power of instruction is seldom of much efficacy except in those happy dispositions where it is almost superfluous" - Gibbon, quoted by R.P.Feynman
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|