请查看以下SQL查询:
SELECT
count(*) as total,
DATEPART(hour,DateSent_dt) as hr,
DATEPART(minute,DateSent_dt) as mm
FROM
dbname cd
WHERE
convert(varchar(10), cd.DateSent_dt, 111) >= convert(varchar(10), '#sdt#', 111)
AND convert(varchar(10), cd.DateSent_dt, 111) <= convert(varchar(10), '#edt#', 111)
GROUP BY
DATEPART(hour, DateSent_dt), DATEPART(minute, DateSent_dt)
ORDER BY
hr
varchar(10)
功能中111
和convert
做了什么?
答案 0 :(得分:0)