How to calculate the number of months between two dates in C#

Viewed 7817

I am doing this

datediff = (date1 - DateOfDeposit).TotalDays;

But this gives the no. of days and I want no.of months.

2 Answers
Related