如何在尝试获取最长时间时从查询中删除时间。
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
答案 0 :(得分:0)
仅将日期作为字符串返回 CONVERT(CHAR(10),MAX(CREATION_DATE),101)