SELECT DATENAME(weekday, GETDATE()) AS 'MyDay';returns:
MyDay
------
SundayWe could also use DATENAME to obtain the name of a month:
SELECT DATENAME(month, GETDATE()) AS 'MyMonth';Which returns:
MyDay
-------
JanuaryFor additional information, please visit: http://msdn2.microsoft.com/en-us/library/ms174395.aspx
No comments:
Post a Comment