sunil sharma
SSC Journeyman
Points: 89
More actions
October 19, 2005 at 7:31 am
#169192
Hello Gurus,
Is there a function or sp to convert numbers (1-12) into month names, ie 1 - January, 2 -February, 12 - December etc ?
thanks in advance for your help
Ninja's_RGR'us
SSC Guru
Points: 294069
October 19, 2005 at 7:35 am
#598233
Select DATENAME(M, GetDate())
October 19, 2005 at 7:39 am
#598236
Sorry, the number is an integer, not a date.
I have a column which has month no's in it, I want to convert them to corresponding month names.
Victor Sokol
Valued Member
Points: 72
October 19, 2005 at 7:46 am
#598238
--For example:
DECLARE @month_num int
SET @month_num = 3
SELECT Datename( month, DATEADD( month, @month_num-1, 0 ) )
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply