Compare the dates (or, more generally, points of time in the form of
System.DateTime
using the operators: "==", ">", "<", ">=" and ">=". Also, use "-" (subtraction) to find the time interval, duration.
System.DateTime before =
System.DateTime after =
if (before == after) { }
if (after >= before) { }
if (after < before) { }
System.TimeSpan duration = after - before;
Please see:
http://msdn.microsoft.com/en-us/library/system.datetime.aspx[
^],
http://msdn.microsoft.com/en-us/library/system.timespan.aspx[
^].
—SA