Sunday, 28 August 2011

Caml query for all documents modified today Sharepoint


Lets look at the CAML Query to get all the items\documents which are modified today

SPQuery DateFieldQuery = new SPQuery();

DateFieldQuery.Query = “
+ DateTime.Now.ToString("yyyy-MM-ddTHH:\\:mm \\:ssZ") +
”;

SPList myList = myWeb.Lists["ListName"];

SPListItemCollection ResultItems = myList.GetItems(DateFieldQuery);


Ads by Google

No comments:

Post a Comment