What is the best way to convert Julian date to date (or datetime)? Thanks.
-- Julian to date conversionDECLARE @JulianDate char(7) = '2011099'SELECTCONVERT(DATE,DATEADD(day, CAST(RIGHT(@JulianDate,3) ASint) - 1, CONVERT(datetime, LEFT(@JulianDate,4) + '0101', 112)))-- 2011-04-09
Kalman Toth SQL SERVER 2012 & BI TRAINING
New Book: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2012