MayfieldGlobal

Everything from operating systems, programming to web development and more.

Jan
09

How do I select the name for a day of the week?

Posted under SQL Server 2005, T-SQL

Selecting the name for a day of the week is fairly straight forward using the DATENAME function and a DATEPART argument. For example:

SELECT DATENAME(weekday, GETDATE()) AS 'MyDay';

returns:
Read the rest of this entry »