0

I'm currently using this piece of code to get month and year.

CONVERT(varchar, DATEPART(year, StartDate)) + '-' + RIGHT('0' + CONVERT(varchar, DATEPART(month, StartDate)), 2) As Month 

but it returns "2011-06"

My Startdate format = 2011-06-15 14:03:00

I would like to get this into "June 2011" - how can I do that?

1

1 Answer 1

4
SELECT DATENAME(month, getdate()) + ' ' + DATENAME(year, getdate()) 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.