📅  最后修改于: 2022-03-11 14:51:54.362000             🧑  作者: Mango
Dim result As Integer = DateTime.Compare(date1, date2)
If result < 0 Then
'date1 is earlier than date2
ElseIf result > 0 Then
'date1 is later than date2
ElseIf result = 0 Then
'date1 is the same as date2
End If