>Hey, whatever works... But, you may want to look at datepart and convert...
>
>SELECT left(convert(datetime,TB.Date,111),7) as Date, ...
>WHERE ...
>GROUP BY datepart(yyyy, TB.date), datepart(mm, TB.date)
>
>>
>>I want the output to be yyyy/mm.
The result is displaying "Apr 2 " and I want 2001/04
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com