CONVERT(char(7), GetDate(), 121)
this gives a date like "2007-03". it works because SQL formats the dates like YYYY-MM-DD etc., so you can just take the first X characters to take as much of the date as you want.
another handy one i use is to get DD/MM/YYYY format:
Convert(NVarChar(10), GetDate(), 103)
© Copyright 2018 Tim Mackey