Dim txt As Date = e.Sender.Text
If txt <> Nothing Then
Dim d As Date = e.Form.Controls("partyTime").Value
Dim y As Integer = d.year
If format(d, "MMdd") <= Format(Date.Today, "MMdd") Then
y = Date.Today.Year - y-1
Else
y = 0
End If
If y < 0 Then
e.Form.Controls("partyStanding").Value = 0
Else
e.Form.Controls("partyStanding").Value = y
End If
End If
老是,红色部分由问题么?从字符串“”到类型“Date”的转换无效。
[此贴子已经被作者于2018/9/11 16:46:09编辑过]