问题:如何在SQL SERVER中合并时间和日期?
解决方法1:使用+合并时间日期
让我们运行以下命令:SELECT CAST(字段名 AS DATETIME) + CAST(
字段名
AS DATETIME) AS [CombineDateTime]
可执行sql案例
insert into USER_SPEDAY (startspecday,endspecday,dateid,yuanying,applydate,state,clearance,roleid,process,processid,procsn,userid,employeelist,processtype)
values
(CAST('{?dzksrq}' AS DATETIME) + CAST('{?dzkssj}' AS DATETIME),CAST('{?dzjsrq}' AS DATETIME) + CAST('{?dzjssj}' AS DATETIME),
case when '{?dzlb}'='-6' then '10' when '{?dzlb}'='35' then '2' when '{?dzlb}'='-13' then '4' else '' end,
'{?dzsm}','{?sqrrq}','2','0','0','','0','0','{?sqr}','','0')
标签:dzlb,数据库,when,DATETIME,CAST,sql,server,字段名
From: https://www.cnblogs.com/ZJ0065/p/17085767.html