In the following for loop row[0].ToString has datetimme value
foreach (DataRow row in ds.Tables[0].Rows) {
dt.Rows.Add("8W2_Mtr_EndPoint", "EndPointChannelID", "Electric", row[0].ToString() } //foreach
I want to format this value in the format "yyyy-MM-dd HH:mm".
I tried the following
row[0].ToString("yyyy-MM-dd HH:mm")
Am I missing something?