Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我有一个15/11/2001存储在数据库中的日期,我想通过 .. 来创建日期的1年份15/11/2002?
15/11/2001
1
15/11/2002
使用DATEADD. 例如,在查询中:
DATEADD
SELECT DATEADD(year, 1, [myDate]) FROM [myTable]
使用DATEADD:
SELECT DATEADD(year, 1, '2001-11-15');