sql server Get the FULL month name from a date
If you are using SQL Server 2012 or later, you can use:
SELECT FORMAT(MyDate, 'MMMM dd yyyy')
You can view the documentation for more information on the format.
SELECT DATENAME(MONTH, GETDATE())
+ RIGHT(CONVERT(VARCHAR(12), GETDATE(), 107), 9) AS [Month DD, YYYY]
OR Date without Comma Between date and year, you can use the following
SELECT DATENAME(MONTH, GETDATE()) + ' ' + CAST(DAY(GETDATE()) AS VARCHAR(2))
+ ' ' + CAST(YEAR(GETDATE()) AS VARCHAR(4)) AS [Month DD YYYY]
Most answers are a bit more complicated than necessary, or don't provide the exact format requested.
select Format(getdate(), 'MMMM dd yyyy') --returns 'October 01 2020', note the leading zero
select Format(getdate(), 'MMMM d yyyy') --returns the desired format with out the leading zero: 'October 1 2020'
If you want a comma, as you normally would, use:
select Format(getdate(), 'MMMM d, yyyy') --returns 'October 1, 2020'
Note: even though there is only one 'd' for the day, it will become a 2 digit day when needed.