rivate Sub Form_Load() Dim a As Date, b As Date a = CDate("2022-1-1 10:00") b = CDate("2022-1-1 8:00") If a > b Then MsgBox "a大" Else MsgBox "b大" End If End Sub