c#计算时间差实现方法:
DateTime DateTime1,
DateTime2 = DateTime.Now;//现在时间
DateTime1 = Convert.ToDateTime("2009-04-24 20:00:00"); //设置要求的减的时间
TimeSpan ts1 = new TimeSpan(DateTime1.Ticks);
TimeSpan ts2 = newTimeSpan(DateTime2.Ticks);
TimeSpan ts = ts1.Subtract(ts2).Duration();
//显示时间差
StringBuilder dateDiff = newStringBuilder();
dateDiff.Append(ts.Days.ToString() + "天");
dateDiff.Append(ts.Hours.ToString() + "小时");
dateDiff.Append(ts.Minutes.ToString() + "分钟");
dateDiff.Append(ts.Seconds.ToString() + "秒");
Response.Write(dateDiff.ToString());