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