日期分组
select convert(varchar(10),AddTime,111) as Date from GenerateProductList group by convert(varchar(10),AddTime,111) having [date] between '2013-05-08' and '2013-05-09'--年月日0
select convert(varchar(7),AddTime,120) as Date from GenerateProductList group by convert(varchar(7),AddTime,120)--年月