Skip to content

Instantly share code, notes, and snippets.

@JohnLBevan
Created January 25, 2014 21:30
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/451886d38796ef5b55db to your computer and use it in GitHub Desktop.
Save JohnLBevan/451886d38796ef5b55db to your computer and use it in GitHub Desktop.
SQL Server Date to JDE Julian Date From http://sqlfiddle.com/#!3/d41d8/28952
select 1000 * (DATEPART(YEAR, GETUTCDATE())-1900)
+ DATEDIFF(day,DATEADD(year, datepart(YEAR,getutcdate())-1900, 0),getutcdate())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment