The input date of date is dat. Text
Is input to the annual YEAR
CodePudding user response:
String can change my judgment, call ready conversion function,CodePudding user response:
Can participateCodePudding user response:
Dim date1 and date2 As DateTimeDate1=Date. Now 'to the Date you entered here
Date2=New DateTime (2020, 3, 1)
Dim monthDiff As Integer=DateDiff (" M ", date1 and date2)
If monthDiff=0 Or monthDiff=1 Then
MsgBox (" right ")
The Else
MsgBox (" error ")
End If