时间先后顺序排
text1 文本框有一组数据2022-1-1 10:00,2
2022-1-1 9:10,3
2022-1-1 8:00,5
2022-1-1 11:00,4
以第一列时间进行排序,按时间先后顺序排
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