How to compare only month and year? [VB]
问题 Its quite simple, i just want to compare two dates using month and year, if the input date (mont and year only) are above or below that current date (month and year). The problem is , when i compare two strings Dim dDate as DateTime If Not (DateTime.TryParse(txtBox.Text, dDate)) Then MessageBox.Show("check date.") Else txtBox.Text = dDate.ToString("MM/yyyy") end If IF dDate.ToString("MM/yyyy") < DateTime.Now.ToString("MM/yyyy") MessageBox.Show("Below") ' Problem: 03/2024 saying is below than