I have a list of dates, that range from July 2015 to January 2016
2015/07/20 14:15:23 2015/07/20 14:16:06 2015/07/26 23:39:15 2015/09/02 22:51:46 2015/09/02 22:52:33 2015/10/26 20:42:23 2015/11/12 14:54:31 2015/11/30 06:49:10 2015/12/02 10:18:17 2015/12/10 08:34:53 2015/12/10 15:15:33 2015/12/15 06:43:32 2015/12/29 02:55:01 2016/01/12 19:46:45 2016/01/13 07:31:14 2016/01/13 07:32:59 2016/01/14 05:28:33
I want to split these up into weeks, So I know exactly how many weeks have passed by and get a count for each group. I'm pulling the dates from a webservice and putting them into a datagridview.
I'm going to add a column called week, where I cant to add the week each belongs to.
if (SplitChkBox.Checked == true)
{
column = new DataColumn();
column.DataType = System.Type.GetType("System.String");
column.ColumnName = "Week";
table.Columns.Add(column);
}
Eventually I'll create a graph off how many instances belong to each week.
Thanks!
EDIT
From 2015/07/20
there are about 25 weeks until 2016/01/14
. I want to return 1-25 and the count of how many weeks belong to that group if its more than 0.