How to display a day from the Date

Gopal picture Gopal · Dec 20, 2010 · Viewed 33.3k times · Source

Using SQL Server 2005

Table1

Date

19-12-2009
20-12-2010
.....

Date Column datatype is DATETIME.

Expected Output

Monday
Tuesday

How to make a query for getting the day...

Answer

Lamak picture Lamak · Dec 20, 2010

You can use the DATENAME function.

SELECT DATENAME(WEEKDAY,[Date])
FROM Table1