hi,
I am using following code to get count from a Document library after performing a query to retrieve data for last 7 days,I executed the query in U2U CAML QUERY Builder it is giving correct results,but when its executed through visual studio 2010, its returning me the total count in library instead of count after executing the query,Code is given below
SPDocumentLibrary weeklyList = (SPDocumentLibrary)web.Lists["
SPQuery Query1 = new SPQuery();
Query1 .Query = "<Query><Where><And><Geq><
SPListItemCollection CountCollection = weeklyList.GetItems(Query1 )
int weekCount = CountCollection .Count;
lblweek.Text = weekCount.ToString();
Any pointers will be helpful thanks in advance.