This is something I don't want to write again...
CASE WHEN DATEPART(WEEKDAY, GETDATE()) = 1 THEN 'Sunday' ELSE
CASE WHEN DATEPART(WEEKDAY, GETDATE()) = 2 THEN 'Monday' ELSE
CASE WHEN DATEPART(WEEKDAY, GETDATE()) = 3 THEN 'Tuesday' ELSE
CASE WHEN DATEPART(WEEKDAY, GETDATE()) = 4 THEN 'Wednesday' ELSE
CASE WHEN DATEPART(WEEKDAY, GETDATE()) = 5 THEN 'Thursday' ELSE
CASE WHEN DATEPART(WEEKDAY, GETDATE()) = 6 THEN 'Friday' ELSE
'Saturday'
END
END
END
END
END
END AS Today
Subscribe to:
Post Comments (Atom)
1 comment:
select datename(weekday, getdate()) today
Post a Comment