在SQLserver中可以利用getDate()来得到当前时间..从而判断是当前时间是否在某个范围内 select * from KM_notice where startTime<getDate() and closeTime>getDate();