Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display a day from the Date

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...

like image 959
Gopal Avatar asked Dec 20 '10 18:12

Gopal


1 Answers

You can use the DATENAME function.

SELECT DATENAME(WEEKDAY,[Date])
FROM Table1
like image 66
Lamak Avatar answered Oct 05 '22 04:10

Lamak