Answers for "how to find date difference in c#"

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
0

get diff btw datetimes two C#

int totalDays = Convert.ToInt32((DateTime.UtcNow.Date - myDateTime.Date).TotalDays);
Posted by: Guest on November-21-2021

Code answers related to "how to find date difference in c#"

C# Answers by Framework

Browse Popular Code Answers by Language