我想转换:
select convert(nvarchar(16), TimeLog, 120) requestTime,
count(Request) As noOfQueries
from LogData
where TimeLog between @StartDate and @EndDate
group by convert(nvarchar(16), TimeLog, 120) order by requestTime;
在 where 子句中Timelog
is between: 2012-06-21
and2012-06-21
但我希望它介于2012-06-21 00:00:00
and2012-06-21 23:59:59
因此,我想将其转换为上述格式,@Satrtdate / @EndDate
因此我想附加00:00:00
到@StartDate
和23:59:59
.@EndDate