SQL Server ->> MSDB.DBO.AGENT_DATETIME函数从整型转时间日期格式
SELECT MSDB.DBO.AGENT_DATETIME(20170101,0), CAST(CAST(20170101 AS NVARCHAR(50)) AS DATETIME)
返回
2017-01-01 00:00:00.000
SELECT MSDB.DBO.AGENT_DATETIME(20170101,0), CAST(CAST(20170101 AS NVARCHAR(50)) AS DATETIME)
返回
2017-01-01 00:00:00.000