select convert(varchar(10),getdate()-1,120)
//求明天
select convert(varchar(10),getdate()+1,120);
//求最近七天
select * from tb where 時間字段>=convert(varchar(10),getdate()-7,120);
//求後七天
select * from tb where 時間字段<=convert(varchar(10),getdate()+7,120) and 時間字段等於>=時間字段;