日期:2014-05-17 浏览次数:20570 次
DateTime t1 = DateTime.Parse(StartTime);
DateTime t2 = DateTime.Parse(FinishTime);
System.TimeSpan ts = t1 - t2;
int hous = ts.Hours;
DateTime one = Convert.ToDateTime("21:30");
DateTime two = Convert.ToDateTime("18:20");
TimeSpan span = one.Subtract(two);
MessageBox.Show(span.Hours.ToString() +"时"+ span.Minutes+"分");