Your syntax is incorrect in several places:
NestedRepeater.WhereCondition = "DATEDIFF(day, DocumentCreatedWhen, GETDATE()) <=" + Request.QueryString["SearchDays"];
A better solution would be to parse out your querystring into an integer since it is coming from user input
int qsValue = CMS.Helpers.ValidationHelper.GetInteger(Request.QueryString["SearchDays"], 0);
NestedRepeater.WhereCondition = "DATEDIFF(day, DocumentCreatedWhen, GETDATE()) <= " + qsValue.ToString();