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