DateTime Comparison in .NET:
DateTime t1 = DateTime.Now;
DateTime t2 = Convert.ToDateTime("11:00:00 AM");
int i = DateTime.Compare(t1,t2);
//if t1 is less than t2 then result is Less than zero
//if t1 equals t2 then result is Zero
//if t1 is greater than t2 then result isGreater zero
No comments:
Post a Comment