SelectCase e.DataCol.name Case"SYQX_Q","SYQX_Z" Dim dr AsDataRow = e.DataRow If dr.IsNull("SYQX_Q") Or dr.IsNull("SYQX_Z") Then dr("YDNX") = Nothing Else Dim y,m,d As Integer Dim dt1 As Date = dr("SYQX_Q") Dim dt2 As Date = dr("SYQX_Z") DateYMD(dt1,dt2,y,m,d) dr("YDNX") = y & "年" & m & "月" & d & "日" EndIf EndSelect