C3 compare hour

82

C3 compare hour -

-1  if  t1 is shorter than t2.
0   if  t1 is equal to t2.
1   if  t1 is longer than t2.

C3 compare hour -

TimeSpan.Compare(t1.TimeOfDay, t2.TimeOfDay)

C3 compare hour -

DateTime t1 = DateTime.Parse("2012/12/12 15:00:00.000");
DateTime t2 = DateTime.Parse("2012/12/12 15:03:00.000");

if(t1.TimeOfDay > t2.TimeOfDay) {
    //something
}
else {
    //something else
}

Comments

Submit
0 Comments