2
我有2個數據集,如下圖所示,我需要這些數據集合併成1:如何排序和順序合併數據集
數據集1
date reason total
12 aug 2010 inactive 123
19 aug 2010 inactive 45
20 sep 2010 inactive 145
02 nov 2010 inactive 95
25 dec 2010 inactive 44
dataset2
date reason total
12 aug 2010 active 12
21 aug 2010 active 45
20 sep 2010 active 45
02 nov 2010 active 45
26 dec 2010 active 45
我可以合併通過使用Merge
方法的數據集,但我怎麼對數據集進行排序,得到的結果是這樣的:
date reason total
12 aug 2010 inactive 123
12 aug 2010 active 12
19 aug 2010 inactive 45
21 aug 2010 active 45
20 sep 2010 inactive 145
20 sep 2010 active 45
02 nov 2010 inactive 95
02 nov 2010 active 45
25 dec 2010 inactive 44
26 dec 2010 active 45
什麼是日期列的數據類型?文字或日期?如果是日期請參閱http://stackoverflow.com/questions/513961/c-sharp-how-do-i-sort-a-datatable-by-date – 2012-01-31 06:24:03