操作datetable 里面查出来的某个字段
作者:互联网
BLL.Room_Scheduled bll = new BLL.Room_Scheduled();
DataSet ds = bll.GetList(where,index);
int i = 0;
foreach (DataRow item in ds.Tables[0].Rows)
{
string CHECKIN_TIME = Convert.ToDateTime(ds.Tables[0].Rows[i]["CHECKIN_TIME"].ToString()).ToString("yyyy-MM-dd");
item["CHECKIN_TIME"] = CHECKIN_TIME + " 16:30";
string CHECKOUT_TIME = Convert.ToDateTime(ds.Tables[0].Rows[i]["CHECKOUT_TIME"].ToString()).ToString("yyyy-MM-dd");
item["CHECKOUT_TIME"] = CHECKOUT_TIME + " 8:00";
i ++;
}
标签:datetable,Rows,CHECKIN,ToString,TIME,某个,查出来,CHECKOUT,ds 来源: https://www.cnblogs.com/codejimmygao/p/14487796.html