Wednesday, November 30, 2011

Getting only Month and Year from Date

Select[YEAR] = YEAR(getdate()), [YEAR] = DATEPART(YY,getdate()), [MONTH] = MONTH(getdate()),
[MONTH] = DATEPART(MM,getdate()), [MONTH NAME] = DATENAME(MM, getdate())

No comments:

Post a Comment