标签:com console write 比较 date 日期 end convert compare
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 "); }
标签:com console write 比较 date 日期 end convert compare
原文地址:https://www.cnblogs.com/JoeYD/p/13207294.html