var d1 = Convert.ToDateTime(list[0].BeginTime); var d2 = Convert.ToDateTime(list[0].EndTime); var difference = Time2TimeStamp(d2) - Time2TimeStamp(d1); var housr = difference / 3600; if (housr - (int)housr > 0) { housr = (int)housr + 1; }
2023-12-21 18:47:52
var d1 = Convert.ToDateTime(list[0].BeginTime); var d2 = Convert.ToDateTime(list[0].EndTime); var difference = Time2TimeStamp(d2) - Time2TimeStamp(d1); var housr = difference / 3600; if (housr - (int)housr > 0) { housr = (int)housr + 1; }