Question: how to calculate number of days between two dates c#?
Answer: //To get the amount of days between two dates.
DateTime date1 = new DateTime(2007,1,1);
DateTime date2 = DateTime. Today;
int daysDiff = ((TimeSpan) (date2 - date1)). Days;