C# 日期比较计算
DateTime t1= DateTime.Now;
DateTime t2= Convert.ToDateTime(endTime);
if(DateTime.Compare(t1, t2) > 0) { Console.WriteLine(" t1 > t2 "); }
if(DateTime.Compare(t1, t2) == 0) { Console.WriteLine(" t1 == t2 "); }
if(DateTime.Compare(t1, t2) < 0) { Console.WriteLine(" t1 < t2 "); }