Dim StDate As Date = txtStartdate.Text 'Get the Start Date Dim EdDate As Date = txtEndDate.Text 'Get the End Date If txtEndDate.Text <> "" Then Dim weekYr As String = getWeek(EdDate) 'Get the Current Week lblEdWkYr.Text = weekYr 'Display the Week and Year End If If txtStartdate.Text <> "" And txtEndDate.Text <> "" Then Dim d1 As New Date(StDate.ToString) Dim d2 As New Date(EdDate.ToString) Dim M As Integer = Math.Abs((d1.Year - d2.Year)) Dim months As Integer = ((M * 12) + Math.Abs((d1.Month - d2.Month))) txtDuration.Text = months End If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)