DECLARE @DesiredDate date='2014-06-28' SELECT CASE WHEN UPPER(DATENAME(dw, @DesiredDate)) = 'SUNDAY' OR UPPER(DATENAME(dw, @DesiredDate)) = 'SATURDAY' THEN 'YES' ELSe 'NO' END
SELECT DATENAME(weekday,@date) AS 'Weekday'
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)