前几天出差 刚回来。狐狸爸爸那么快就回复了,感谢~~~
小弟编程水平不行 后面几句没看明白 不知能否帮忙解答下` 感激!
Select Case e.DataCol.name
Case "值"
If e.DataRow.IsNull("值") Then
e.DataRow("日期") = Nothing
Else
Dim s As String = e.DataRow("值")
Dim ys As String = s.Substring(7,2)
Dim ms As String = s.Substring(9,2)
Dim y As Integer
Dim m As Integer
If Integer.TryParse(ys,y) AndAlso Integer.TryParse(ms,m) Then
Dim dt As New Date(2000 + y + 1,1,1)
e.DataRow("日期") = dt.AddDays(m-1)
End If
End If
End Select
另 这个程序稍微有点问题,例610ABCD2125A078是2012年第125天,应该得出的是2012年5月4日,实际得出的是2021年1月25