【发布时间】:2011-05-05 11:16:27
【问题描述】:
由于某种原因,我从数据库中获取了一些数据,这些数据在年月和年中都有不同的日期,我想连接该列并添加一个新列。
我正在做的是添加数据
DataColumn newColumn;
newColumn = new DataColumn("CompositeDate");
newColumn.Expression = "Day + Month + Year" ;
scaleResponseData.Columns.Add(newColumn);
数据表中的数据是这样的
year | Month | Day
2009 10 2
2010 11 3
我当前的代码在做什么
year | Month | Day | composite_Date
2009 10 2 2021
2010 11 3 2024
但结果应该是一些东西
year | Month | Day | composite_Date
2009 10 02 20091002
2010 11 03 20101103
我有不同的组合,但没有任何效果
【问题讨论】: