日期分组

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)--年月

posted on 2013-05-13 13:23  水行者  阅读(180)  评论(0编辑  收藏  举报

导航