I am adding data in the datatable using the following code
foreach (DataRow row in dtRevClassAvgByDate.Rows) { dtMeter.Rows.Add(meterId + "_EndPoint:1-Electric", Global.ChannelIdType, Global.MarketType, ((DateTime)row["DayAndHour"]).ToString("yyyy-MM-dd HH:mm"), float.Parse(row["AVG_kWH_Del"].ToString()) * ratioAmrToAmi, Global.IntervalLength, 0, 0, 0, 0, 0, 0, 0); }
The following code is throwing Specified cast is not valid exception
float.Parse(row["AVG_kWH_Del"].ToString()) * ratioAmrToAmi,
Any thoughts?