By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
create table testT (Date_c date)
insert into testT values ('Feb 2 2016 12:00AM')
1 rows affected
insert into testT values ('Feb 5 2018 12:00AM')
1 rows affected
select * from testT;
Date_c |
---|
2016-02-02 |
2018-02-05 |
SELECT DATEADD(YEAR , 2020- year(Date_c),Date_c) as Date_Modified
, Date_c
from testT
where year(Date_c) = '2016'
Date_Modified | Date_c |
---|---|
2020-02-02 | 2016-02-02 |
Insert into testT
select DATEADD(YEAR , 2020- year(Date_c),Date_c)
from testT
where year(Date_c) = '2016'
1 rows affected
select * from testT;
Date_c |
---|
2016-02-02 |
2018-02-05 |
2020-02-02 |