下图试图解释按日期/时间范围选择数据的逻辑:
Period Start "Ps"
Period End "Pe"
Ps Pe
s-E | | ignore, starts & ends before the period (E not > Ps)
s--|--------|-E spans the period
s-|---E | start before, but ends in, the period
s----E | starts at beginning of the period, finishes before the period ends
| s---E | starts and finished within the period
| s----E starts within the period, finishes on last day of the period
| s--|-E starts within the period but finishes after the period
| | s-E ignore, starts & ends after the period (s not < Pe)
s < Pe
+ E >= Ps
DECLARE @Ps AS datetime = '2018-09-20 11:00.00.000'
DECLARE @Pe AS datetime = DATEADD(HOUR, 24, @Ps)
SELECT
t.*
FROM yourtable AS t
WHERE t.[start] < @Pe
AND t.[end] >= @Ps