Use this for back 5 days.
CAST(Convert(varchar(10),getdate()
-5,121) as datetime)
May be you can use somthing like this
Code:
Declare @EndDay datetime
Declare @StartDay datetime
Set @StartDay = CAST(Convert(varchar(10),getdate()-5,121) as datetime)
Set @EndDay = CAST(Convert(varchar(10),getdate(),121) as datetime)
Select * from YOURTABLE where DATECOLUMN between @StartDay and @EndDay
On Books online you can search for "DATETIME Functions"
Or on SQL query analyser, type the function that you want to see help on or type getdate(), select that word and press SHIFT + F1, which would show you that function related help, and at the end of the page you can see the other related functions displayed there. For there on you can go learning.
Hope that helps.
Cheers!
_________________________
-Vijay G

Strive for Perfection
