Created
January 25, 2014 21:21
-
-
Save JohnLBevan/60eabae86d373a23aa91 to your computer and use it in GitHub Desktop.
Oracle Date to JDE Julian
From http://sqlfiddle.com/#!4/d41d8/24024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
1000 * (TO_NUMBER(TO_CHAR(SYSDATE,'YYYY')) - 1900) | |
+ ( | |
TO_DATE(TO_CHAR(SYSDATE, 'DD/MM/YYYY'), 'DD/MM/YYYY') | |
- TO_DATE('01/01/' || TO_CHAR(SYSDATE,'YYYY'),'DD/MM/YYYY') | |
) | |
+ 1 | |
Todays_Date_As_Julian | |
from dual; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment