Is there a method in C# which can compare dates like the SQL DateDiff
method, including time part argument?
For example I have two dates:
DateTime early = "2013.02.01 07:31:15";
DateTime soon = "2013.02.01 23:48:35";
if (Compare(early, soon, DAY) == true)
{
//I want to be here
}
I want to get info that these two objects are equal in year, month and day; the rest is not important to me.