SQL SERVER – Finding Day Name from Date


 

In today’s blog post we will a very simple script where we will find day name from any valid date. There are multiple ways you can do it and we will see it in multiple ways.

In our example, we will be using the date of today which is July 27, 2020, and it is Monday today.

Method 1: DateName() Function for Day Name

This is one of the most popular methods.

DECLARE @DateVal DATE = ‘2020-07-27’; SELECT @DateVal As [Date], DATENAME(WEEKDAY, @DateVal) AS [Day Name];

When you run the above script you will see the date which is passed along with the day name.

Instead