Question: how to calculate number of days between two dates in asp.net c#?
Answer: //Creating object of TimeSpan Class.
TimeSpan objTimeSpan = ToYear - FromYear;
//Total Hours.
double TotalHours = objTimeSpan. ... 
//Total Minutes.
double TotalMinutes = objTimeSpan. ... 
//Total Seconds.
double TotalSeconds = objTimeSpan.