वर्ष का हिस्सा प्राप्त करें, डेटाटाइम में कनवर्ट करें + दिन जोड़ें
DECLARE @var NVARCHAR(100) = '2015223';
SELECT CAST(LEFT(@var, 4) AS DATETIME) + CAST(RIGHT(@var, 3) AS INT) - 1;
या:
DECLARE @var NVARCHAR(100) = '2015223';
SELECT DATEADD(dd,CAST(RIGHT(@var, 3) AS INT)-1, CAST(LEFT(@var, 4) AS DATETIME))
या अगर yyyyxxx INT है:
DECLARE @var INT = 2015223;
SELECT DATEADD(dd,(@var%1000)-1, CAST(CAST((@var/1000) AS NVARCHAR(100))
AS DATETIME));