SELECT MSDB.DBO.AGENT_DATETIME(20170101,0), CAST(CAST(20170101 AS NVARCHAR(50)) AS DATETIME)
返回
2017-01-01 00:00:00.000