where datefield between getdate() and (convert(char(10,getdate(),120)+' 23:59:59')

解决方案 »

  1.   

    select * from YouTable 
    where [Time] between datepart(hh,getdate()) and 24
      

  2.   

    错了的说,更正where datefield  between getdate() and (convert(varchar(10),getdate(),120)+' 23:59:59')
      

  3.   

    select * from YouTable where datefield  between getdate() and (convert(varchar(10),getdate(),121))
      

  4.   

    select * from yourtable where yourtime>=getdate() and datediff(day,yourtime,getdate())=0