Pages

Friday, 13 April 2012

display 7 days before records from the data base


select title, createdDate, lastdate  from date_testing
where (month(createdDate)=month(getdate()))
and (month(createdDate) between month(getdate())-1 and month(getdate())+1     )
and (day(createdDate) between day(getdate())-7 and day(getdate())+3     )


use this query ..................

No comments:

Post a Comment