SQL SERVER – Get Month Name from date using format function


SQL Server Portal

How to get the Month Name from Date ? Have been questioned numerous times and we do have its solution via DATENAME function. However, today we will achieve the same solution using FORMAT function, introduced in SQL Server 2012 as well. Given below are the two methods that help in identifying the Month Name from Date in SQL Server 2005 & above as well as SQL Server 2012 & above.

Method 1 :
Script supported in SQL Server 2005 and above :

get month name from date1.1

Method 2 :
Script supported in SQL Server 2012 and above :

Get month name from date-1
Have you come across any other method ? Do share.

View original post