• Sumit Rastogi (2/9/2015)


    SELECT DATENAME(month, @MonthNumber)

    Example: SELECT DATENAME(month,1)

    Result: January

    Just to note, the DATENAME functions requires a date for the second argument. They way you have it you are expressing 1900-01-01. If I do

    DATENAME(month, 31) --> 1900-01-31 it is still January.

    DATENAME(month, 32) --> 1900-02-01 it gives February.

    This method is confusing and unnecessarily complex. Please also note the age of this thread and that is has been successfully answered.

    ----------------------------------------------------