c# compare two datetime values if they are equal for the same day code example
Example: c# how to compare 2 dates without time
if(dateTime1.Date == dateTime2.Date)
// or
if (dateTime1.Date.CompareTo(dateTime2.Date))
{
}
if(dateTime1.Date == dateTime2.Date)
// or
if (dateTime1.Date.CompareTo(dateTime2.Date))
{
}