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.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Vimal KandasamyPosted Mar 13, 2009, 8:56 AM
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
}