此代码总是返回 '0' 我不知道为什么
Dim cur_month = DatePart(DateInterval.Month, Now).ToString()
Dim cur_date As String = "01/" + cur_month + "/" + (DatePart(DateInterval.Year, Now).ToString)
Dim sel_date As String = "01/" + (cmb_mnth.SelectedIndex + 1).ToString + "/" + txt_year.Text.ToString
Dim date_dif As String = DateDiff(DateInterval.Month, CDate(sel_date), CDate(cur_date))
MsgBox(date_dif)
cnb_mnth 是月份的组合框
txt_year 是输入年份的文本框