年の部分を取得し、日時に変換 + 日数を追加
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));