在尝试获取最大时间时,如何从查询中删除时间。
Select (CONVERT(date,DATEADD(d,-7, GETDATE()) , 101)) as FromDate, max(Creation_Date) as ToDate
from [UserRatings_all]
WHERE ([UserID] = 'blah')
group by userid
给我:
FromDate ToDate
2013-09-19 2013-09-21 02:27:34.000
我需要放弃那个 toDate