title: Convert 7 digit Julian Date to DateTime in SQL?
body: <p>I have seen numerous examples on the web and a few here on SO. However, none seem to work for my data. Here are a few julian dates with their known converted values.</p>
  
  <pre><code>JUL | DateTime
  2454522 | 2008-02-25 00:00:00.000
  2454571 | 2008-04-14 00:00:00.000
  2455713 | 2011-05-31 00:00:00.000
  </code></pre>
  
  <p>I have tried this which does not work:</p>
  
  <pre><code>DECLARE @JD int = 2454522
  SELECT DATEADD(YEAR, @JD / 1000 - 1900, @JD % 1000 - 1)
  </code></pre>
  
  <p>It gives me this: 2455-06-06 00:00:00.000 which is obviously wrong. What am I missing here? Thanks ind advance.</p>