How to add Days to DateTime in Sql Server? How to add Weeks to DateTime in Sql Server? How to add Months to DateTime in Sql Server? How to add Quarters to DateTime in Sql Server? How to add Years to DateTime in Sql Server? 1: How to add Days to DateTime in Sql Server? Definition:- The DATEADD() function adds or subtracts a specified time interval from a date. Syntax – DATEADD(DATEPART, NUMBER , DATETIME) SELECT DATEADD( DAY , - ( 2 ), GETDATE()) AS DATEADD_DAYS Result - DATEADD_DAYS ------------------------- 2017 - 04 - 18 16 : 37 : 47 . 833 The date part will be, a) Year b) Quarter c) Month d) Dayofyear e) Day ...
Angular, React, JavaScript, Java, PHP, SQL, C#, Vue, NodeJs, TypeScript and Interview Questions Answers