标签:
string dateDiff = null; DateTime DateTime1 = DateTime.Now; DateTime DateTime2 = DateTime.Now.AddDays(1).Date; TimeSpan ts1 = new TimeSpan(DateTime1.Ticks); TimeSpan ts2 = new TimeSpan(DateTime2.Ticks); TimeSpan ts = ts1.Subtract(ts2).Duration(); dateDiff = ts.Days.ToString() + "天" + ts.Hours.ToString() + "小时" + ts.Minutes.ToString() + "分钟" + ts.Seconds.ToString() + "秒";
.net 计算当前时间距离今晚00:00:00还有多少分多少秒
标签:
原文地址:http://www.cnblogs.com/cang12138/p/5249784.html