日期:2014-05-17 浏览次数:20506 次
update userinfo set 领证日期=convert(varchar(10),dateadd(year,1,cast(LEFT(领证日期,4)+'-'+RIGHT(领证日期,2)+'-01' as DATE)),23)
------解决方案--------------------
update userinfo set 领证日期 = dateadd(year,convert(datetime,substring(出生年月,1,4)+'-'+substring(出生年月,5,2)+'-01',120)
------解决方案--------------------
update tb set 出生年月= dateadd(year,1,cast(left(出生年月,4)+'-'+substring(出生年月,5,2)+'-'+'01' as datetime))