SQL Server 2017 Hosting :: Get Day of Week in SQL Server

SQL Server 2008 introduced DATENAME function that return name of datepart of the specified date.
Syntax
DATENAME ( datepart , date )
 

Example

Output
In this example we use “dw” to get the Day Name but you can use “mm” to get the month name and “yy” to get the year value.
Example