select 
  case 
    when dateadd(dd,-7,getdate()) between '2005-10-01' and '2005-10-03 23:59:59'     
    then 1 
    else 0 
  end