TimeSpan span = Convert.ToDateTime("2017-06-30 19:56").Subtract(Convert.ToDateTime("2017-06-30 19:35")); Response.Write(span.TotalDays);//天 Response.Write(span.TotalHours);//小时 Response.Write(span.TotalMinutes);//分钟 Response.Write(span.TotalSeconds);//秒