I would like to display date fields as year and month only

I have a date field that will display as 2011-01-01, but would like to display it like this 2010-Jan.
Jintonix415Asked:
Who is Participating?
 
Anthony PerkinsCommented:
Something like this perhaps:
CAST(DATEPART(YEAR, GETDATE()) AS char(4)) + '-' + LEFT(DATENAME(MONTH, GETDATE()), 3)

Open in new window

0
 
Jintonix415Author Commented:
Yes, that worked flawlessly. Thanks again!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.