且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在单个查询中使用sql添加日期,月份和年份

更新时间:2023-01-29 08:06:31

使用SQL 日期添加 [ ^ ] function


使用以下语法
 DATEADD(datepart,number, date 


Dateofbirth Textbox1

In textbox1 i have today'sdate 25/09/2015

from the above todays i want to add 60 days. for that how can i do using sql server.

i want to get the output as follows

25/11/2015 (Output i wan to get).

Use the SQL DateAdd[^] function


Use below syntax
DATEADD(datepart,number,date)