select DATEDIFF (hh,getdate(),'2009-10-10')将后边的'2009-10-10' 写成你自己要求的时间就可以求出和当前时间之间的差存储过程中你可以先定义一变量将其写到那里.比如select DATEDIFF (hh,getdate(),@datetime)