sqlserver 把查到的时间加年

 

---DATEADD(yy,1,begindate)   begindate字段   如果想要加一年 1   想要减一年  -1

update gas_task set begindate= DATEADD(yy,1,begindate) where govid =380 and task_type=1 and finish_status='待安检,已过期' and begindate <'2018-05-31 16:45:11.220'

posted @ 2020-06-15 09:22  枫岫  阅读(1923)  评论(0编辑  收藏  举报