SQL Server - Get Year|Month|Quarter|Week|Day| from a Given Date

Опубликовано: 27 Октябрь 2024
на канале: Mukesh Singh
18,376
84

In this tutorial, we will learn that how to get Year, Month, Quarter, Weeks, Days, Day of Year and Day of the month by using DatePart()
function in SQL Server.
As you know that In SQL Server, the T-SQL DATEPART() function returns an integer that represents the specified datepart of the specified date.