How to add or subtract days or time in SQL Server using the DATEADD Function

SQL Server 101
SQL Server 101
21.3 هزار بار بازدید - 3 سال پیش - In this video, we will
In this video, we will be add a time period to a date in SQL Server using the DATEADD function.
My SQL Server Udemy courses are:
70-461, 70-761 Querying Microsoft SQL Server with T-SQL: https://rebrand.ly/querying-microsoft...
98-364: Database Fundamentals (Microsoft SQL Server): https://rebrand.ly/database-fundamentals
70-462 SQL Server Database Administration (DBA): https://rebrand.ly/sql-server-dba
Microsoft SQL Server Reporting Services (SSRS): https://rebrand.ly/sql-server-ssrs
SQL Server Integration Services (SSIS): https://rebrand.ly/sql-server-ssis
SQL Server Analysis Services (SSAS): https://rebrand.ly/sql-server-ssas-mdx
Microsoft Power Pivot (Excel) and SSAS (Tabular DAX model): https://rebrand.ly/microsoft-powerpiv...
----
My Excel for PC courses are:
Beginner to Excel - https://rebrand.ly/microsoft-excel-sp...
Intermediate to Expert Advanced - https://rebrand.ly/microsoft-excel-ex...
Power Table, Get and Transform and Power Pivot - https://rebrand.ly/visualizing-data-e...
VBA macros for Excel - https://rebrand.ly/excel-vba-pc
----
The DATEADD function does allow you to add durations to dates. However, despite its name, it also allows you to add to time, and to subtract from dates and time. For example, you might want the day after, the day before, the next year, or the previous hour.
DATEADD can add multiple or a single year, quarter, month, week, day, hour, minute, second, millisecond, microsecond or nanosecond.
It can be used for fields of the data types date, datetime, datetimeoffset, datetime2, smalldatetime or time.
3 سال پیش در تاریخ 1400/02/15 منتشر شده است.
21,360 بـار بازدید شده
... بیشتر