DataColChanged事件,我想得到的月份格式为:01月、02月......11月、12月,加黑的代码不对,怎样修改?
谢谢!
If e.DataCol.Name = "立案日期" Then
If e.DataRow.isnull("立案日期") Then
e.DataRow("立案年份") = Nothing
e.DataRow("立案月份") = Nothing
Else
e.DataRow("立案年份") = e.newvalue.Year & "年"
e.DataRow("立案月份") = Format(e.newvalue.Month,"MM") & "月"
End If
End If