Friday, December 11, 2009

Caml Query

Substracting 5 days from the current date in the caml query.

SPSite site = new SPSite("http://url");
SPWeb web = site.OpenWeb();
SPList list = web.Lists["ListName"];
string querystring = ""
+ "
";
SPQuery query = new SPQuery();
query.Query = querystring;
DataTable table = list.GetItems(query).GetDataTable();

No comments:

Post a Comment