• Little late, but I was looking for something else and saw this one today. I run across this all the time, and was wondering why something like the following wasn't suggested. it returns an integer, but formats the same for output, and can be used for sorting.

    DECLARE @MyDate datetime = '1/1/2008'

    select DATEPART(year, @MyDate) * 100 + DATEPART(MONTH, @MyDate)