I know this is an old question, but I'd suggest using SQL Servers "Format" statement, like this:
select Format(getDate(), 'yyyy_MM')
It's quick, simple and to-the-point