打开程序后提示错误,注释SystemIdle里的代码后可以使用了,请问老师以下注释掉的代码应该怎样修改,之前一直运行正常,今天才提示错误,请老师指点。
以下为错误提示及SystemIdle中的代码:
打开程序后提示如下错误:.NET Framework 版本:4.0.30319.42000
Foxtable 版本:2020.1.19.19
错误所在事件:SystemIdle
详细错误信息:
从字符串“2020-2-30”到类型“Date”的转换无效。
然后注释以下代码后可用:
'static ln As New Lunar(Date.Today)
'Dim str As String = ""
'Dim d As Date = cdate(ln.LunarDate)
'If d.Day <= 10 Then
'str = cldate(d).Substring(5).trim("日")
'str = str.Insert(str.Length-1, "初")
'Else
'str = cldate(d).Substring(5).trim("日")
'End If
'statusBar.Message1 = "使用单位:" & User.Name & " " & "今天是: " & Format(Date.Today,"yyyy-MM-dd" & " " & format(Date.now, "HH:mm:ss") & " 农历" & str & " " & Format(Date.Today,"dddd" ))
'statusBar.DefaultMessage = statusBar.Message1