So I'm trying to Getthe difference between 2 dates as an Int and add the int to thedatatable, I'm pretty sure the error is in the final line, since instead of executing this line, the code just breaks out of the loop. Is is asyntax error I'm missing or is there a method to this madness?
Here's what I'm working with.
Here's what I'm working with.
DateTime StartHold = Convert.ToDateTime(GetStart.ExecuteScalar()); DateTime EndHold = Convert.ToDateTime(GetEnd.ExecuteScalar()); NewLine["TotalDays"] = DateTime.Parse(EndHold.ToString()).Date - DateTime.Parse(StartHold.ToString()).Date;