i need sample code for two "date comparison" (Eg: date1>date2 )
date function's such as "two date addition" and "two dates subtraction"
in visual C# studio 2005.
Date function
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Vimal KandasamyRank #2,151 · 661 reputationPosted Mar 13, 2009, 4:56 AM EDT
hi
use the following code
TimeSpan day=DateTime.date1.Subtract(date2);
if (day.Days >0)
{
//date1 is greater than date2
}
else
{
//date2 greater than date1
}