You can use DATEPART() function to extract the month number from the month name in date:
SELECT DATEPART (MM, 'January 01 2020') - returns 1
SELECT DATEPART (MM, ‘April 01 2020') - returns 4
SELECT DATEPART (MM, 'May 01 2020') - returns 5
If your column has the only month and you want to convert into month number then there is no inbuilt function for that. You can use the following SQL query to convert month name to month:
CASE WHEN MonthName= 'January' THEN 1
WHEN MonthName = 'February' THEN 2
...
WHEN MonthName = 'December' TNEN 12
END AS MonthNumber
If you are interested in SQL, then take up this SQL Training course by Intellipaat that offers instructor-led training, certification, and job assistance.