DataTable의 필드를 업데이트하려고합니다. 내가 편집하려고하는 필드는 날짜이고, 포맷해야합니다.DataTable의 행을 업데이트하는 이유는 무엇입니까?
foreach (DataRow row in dt.Rows)
{
string originalRow = row["Departure Date"].ToString(); //displays "01/01/2010 12:00:00 AM"
row["Departure Date"] = DateTime.Parse(row["Departure Date"].ToString()).ToString("MM/dd/yyyy");
string newRow = row["Departure Date"].ToString(); //also displays "01/01/2010 12:00:00 AM"
}
어떻게 업데이트되지 않나요?
출발일이 NULL입니까? – DOK