Dim dr As DataRow = e.DataRow Select Case e.DataCol.Name Case "月份","选择"
if dr.isnull("月份") = false andalso dr("月份").length = 6 Dim y As Integer = cint(dr("月份").substring(0,4) ) Dim m As Integer = cint(dr("月份").substring(4,2) ) Dim dt1 As New Date(y, m, 1) dr("开始日期") = dt1 Dim dt2 As New Date(y, m, Date.DaysInMonth(y,m)) dr("结束日期") =dt2