Question: how to calculate the months between two dates in c#?
Answer: DateTime date1 = DateTime.Parse("02/03/2019"); DateTime date2 = DateTime.Parse("02/01/2019"); Console.WriteLine(((date1.Year - date2.Year) * 12) + date1.Month - date2.Month);