第一段代码是你自己的····
第二段改为:
If e.DataCol.Name="patientsID" Then
If dr("patientsID")>"" Then
Dim s As String = dr("patientsID")
Dim s1 As Integer =s.Length
Dim s2 As String = left(s,s1-8)
Dim s3 As Date = CDate(left(right(s,8),4) & "-" & _
left(right(s,4),2) & "-" & right(s,2))
dr("姓名")=s2
dr("出生日期")=s3
End If