开发者

DataSet transformation to new DataSet group by (x)

开发者 https://www.devze.com 2022-12-13 07:54 出处:网络
I have DataSet. it returns date, and value by date. for ex: 01.01.2009454 02.01.2009785 03.01.2009475 -------------

I have DataSet. it returns date, and value by date.

for ex:

01.01.2009   454
02.01.2009   785
03.01.2009   475
----------   ---
30.01.2009   523

I need new DataSet, that group by week. for ex:

1 Week 1-7   2017
2 Week 7-15  458开发者_如何学C6  
-----------------
5 Week 24-30 1482

Week begin from monday.

not importand only for this example, important that, how group by (x) initial DataSet.

Please, any Idea.


Either iterate by the original dataset, gather the info and enter it to the new dataset, or add a week column to the database, and query the table using group by to get the dataset that you want.

0

精彩评论

暂无评论...
验证码 换一张
取 消