how to get this date format: eg July 2007 | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

how to get this date format: eg July 2007

How to get the getdate() value with this format : July 2007 by using sql statement? I had try using this statement:
select todaydate = case getdate() when 1 then ‘January’ when 2 …. + ‘ ‘ + datepart(year,getdate()) Any other better way to write this statement ? Thanks

select datename(month, getdate()) + ‘ ‘ + convert(varchar(10), year(getdate())) KH
Formatting is the function of presentation layer. SQL Server is not the right place to do this kind of formatting. Harsh Athalye
"Nothing is Impossible" fyi. Satya SKJ
Microsoft SQL Server MVP
Writer, Contributing Editor & Moderator
This posting is provided AS IS with no rights for the sake of knowledge sharing. The greatest discovery of my generation is that a human being can alter his life by altering his attitudes of mind.