SQL Server > Built in functions

Get weekday name in SQL Server

How to get week day name in Sql Server?


To get week day name like Sunday, Monday etc. based on a date, we can use datename function.

select datename(dw, getdate())

select datename(dw, '2015-05-19') 

Above both sql statement would give "Tuesday" result.

It gives the name of the day of the week of the date passed (like Tuesday , if this could would have run on 19-May-2015).

 Views: 6268 | Post Order: 66



Write for us






Hosting Recommendations