I have months stored in SQL Server as 1,2,3,4,...12. I would like to display them as January,February etc. Is there a function in SQL Server like MonthName(1) = January? I a
Use this statement for getting month name:
DECLARE @date datetime SET @date='2015/1/4 00:00:00' SELECT CAST(DATENAME(month,@date ) AS CHAR(3))AS 'Month Name'
This will give you short month name. Like this: Jan, Feb, Mar, etc.