比如我有
2007-12-01 00:00:00.000
但我希望如此
2012-12-01 00:00:00.000 (The current year were in)
我一直在玩约会,但我似乎无法指出它.
任何意见,将不胜感激.
谢谢
DECLARE @date datetime = '2007-01-09T12:34:56' SELECT @date = DATEADD(yyyy,DATEDIFF(yyyy,@date,GETDATE()),@date) SELECT @date