Question: how to get difference between two dates in months 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);