SQL Server Hosting – How to Get Day of Week in SQL Server?

SQL Server 2008 introduced DATENAME function that return name of datepart of the specified date.

Syntax

Example

Output

1
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

2

HostForLIFE.eu SQL Server 2016 Hosting
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.