Skip to content

Instantly share code, notes, and snippets.

@JohnLBevan
Created January 25, 2014 21:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JohnLBevan/60eabae86d373a23aa91 to your computer and use it in GitHub Desktop.
Save JohnLBevan/60eabae86d373a23aa91 to your computer and use it in GitHub Desktop.
Oracle Date to JDE Julian From http://sqlfiddle.com/#!4/d41d8/24024
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