If e.DataCol.Name = "交易日期" Then If e.NewValue.length = 8 Then Dim str As String = e.NewValue.Substring(0,4) & "-" & e.newvalue.Substring(4,2) & "-" & e.newvalue.Substring(6,2) Dim d As Date If Date.TryParse(str,d) Then e.DataRow("日期") = d End If End If End If