Dim str As String = "2017年1月5日 10时11分15秒" Dim r As New System.Text.RegularExpressions.Regex("[年月日时分秒]") Dim ary() As String = r.Split(str) If ary.length = 7 Then Dim d As Date = new Date(ary(0), ary(1), ary(2), ary(3), ary(4), ary(5)) msgbox(d) Else msgbox("格式不正确") End If