csharp how to compare 2 dates without time
Code Example - csharp how to compare 2 dates without time
if(dateTime1.Date == dateTime2.Date)
// or
if (dateTime1.Date.CompareTo(dateTime2.Date))
{
}
get diff btw datetimes two csharp
int totalDays = Convert.ToInt32((DateTime.UtcNow.Date - myDateTime.Date).TotalDays);