Answers for "c#get differences between dates"

C#
12

c# calculate difference between two dates in days

(EndDate - StartDate).TotalDays //double
(EndDate.Date - StartDate.Date).Days //int
Posted by: Guest on June-07-2020
3

c# how to compare 2 dates without time

if(dateTime1.Date == dateTime2.Date)
  // or 
if (dateTime1.Date.CompareTo(dateTime2.Date))
{
}
Posted by: Guest on May-14-2020

Code answers related to "c#get differences between dates"

C# Answers by Framework

Browse Popular Code Answers by Language