Please guide
CalculateMonth Difference between two date in VB.net in asp.net
txtStartingDate.Text value is '01/11/2020'
txtEndingDate.Text value is '31/01/2021'
Month Difference between above two value is '3'
Dim d1a As DateTime = DateTime.Parse(txtStartingDate.Text, New System.Globalization.CultureInfo("pt-BR"))
Dim d2a As DateTime = DateTime.Parse(txtEndingDate.Text, New System.Globalization.CultureInfo("pt-BR"))
Dim M As Integer = Math.Abs((d1a.Year - d2a.Year))
Dim months As Integer = ((M * 12) + Math.Abs((d1a.Month - d2a.Month))) + 1