>>
>>select convert(char(6), myTable.myDateField,112) as YearMonth, ...
>>
>>from myTable
>>group by convert(char(6),myTable.myDateField,112)
>
>Thanks, I assume 112 has a specific meaning to return the value.
Yes. Check
CAST & CONVERT for all available formats. 112 is the ISO format 'yyyymmdd'
If it's not broken, fix it until it is.
My Blog