Sql Server -更新语句,修改的字段是日期时间型,修改其中的月份
update T_Sys_Partner set EXPIREDATE = convert(nvarchar,year(EXPIREDATE))+'-'+'6' + right(convert(nvarchar(19),EXPIREDATE ,120),12) WHERE MONTH(ExpireDate) = 4
update T_Sys_Partner set EXPIREDATE = convert(nvarchar,year(EXPIREDATE))+'-'+'6' + right(convert(nvarchar(19),EXPIREDATE ,120),12) WHERE MONTH(ExpireDate) = 4