Hi,
Our requirement is to get the file count with selected date by the user from two date time picker controls i.e. dtp1 and dtp2 into the data table. I am able to get the file count of specific folder from Pages library through below code. Now need to get the selected date range from two date time picker controls and check with the item created by is within the date range. If yes I need to get the file count.
So please share your ideas/thoughts to do the same.
SPList list = wikiweb.Lists["Pages"];
SPFolderCollection oFolders = list.RootFolder.SubFolders["foldername"].SubFolders;
DataTable dt = new DataTable();
dt.Columns.Add("Column1");
DataRow dr;
if (oFolders.Count> 0)
{
foreach (SPFolder oFolder in oFolders)
{
if (!oFolder.Name.Equals("Forms"))
{
dr = dt.NewRow();
dr["Column1"] = oFolder.ItemCount.ToString();
dt.Rows.Add(dr);
}
}
Regards,
Sudheer
Thanks & Regards, Sudheer