数字到日期_DataColChanged
If e.DataCol.Name = "数字" Then
If e.DataRow("数字") Like "########"
e.DataRow("日期") = DateTime.ParseExact(e.DataRow("数字"),"yyyyMMdd",Nothing)
Else If e.DataRow("数字") Like "######"
e.DataRow("日期") = DateTime.ParseExact(e.DataRow("数字"),"yyMMdd",Nothing)
Else If e.DataRow("数字") Like "##[-]##[-]##"
e.DataRow("日期") = DateTime.ParseExact(e.DataRow("数字"),"yy-MM-dd",Nothing)
Else If e.DataRow("数字") Like "##[-]##"
e.DataRow("日期") = DateTime.ParseExact(e.DataRow("数字"),"MM-dd",Nothing)
Else If e.DataRow("数字") Like "####"
e.DataRow("日期") = DateTime.ParseExact(e.DataRow("数字"),"MMdd",Nothing)
Else
Return
End If
End If