Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

File Count with selected date range

$
0
0

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


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>