select id, case when articleTime between (dateadd(day,-7,getdate())) and dateadd(day,7,getdate()) then 1 else 0 end articleTime from articleTest