this.outtime.Value = Convert.ToDateTime("2007-10-20 19:00:00");
this.intime.Value = Convert.ToDateTime("2007-10-18 18:00:00");
TimeSpan c = this.outtime.Value-this.intime.Value;
MessageBox.Show(Convert.ToInt32(c.Days).ToString());
返回是1天,不是我想要的 2007-10-20 - 2007-10-18 = 2 天