Expand To Show Full Article
How to get day of a week in SQL Server ? - Developer Publish

How to get day of a week in SQL Server ?

Assume that you have a date “01/09/2016” and you would like to find out what day of the week it is. For example , it should display if it is Monday , Tuesday , Wednesday…

You can use the DATENAME function to get the day of a week as shown.

How to get day of a week in SQL Server ?

SELECT DATENAME(dw,GETDATE()) as day 

This will display Thursday as result.

image