Quantcast
Viewing all articles
Browse latest Browse all 46

Answer by Shah Zaiƞ for Difference in months between two dates

You can use Noda Time https://nodatime.org/

LocalDate start = new LocalDate(2010, 1, 5);LocalDate end = new LocalDate(2012, 6, 1);Period period = Period.Between(start, end, PeriodUnits.Months);Console.WriteLine(period.Months);

Viewing all articles
Browse latest Browse all 46

Trending Articles