在项目启动做了到期提醒,但发现提示出错了,有个营业执照是2022-11-14到期,但今天登陆竞然提示还有8天到期"(2022-11-14)-(2015-11-6)",年份难道没有进行计算?
Dim ids As String
Dim cnt As Integer
Dim nms As String
For Each dr As DataRow In DataTables("企业资料").DataRows
Dim dt As Date = dr("证件期限_营业执照")
dt = New Date(Date.Today.Year,dt.Month,dt.Day)
If Date.Today.AddDays(0) < = dt And dt < = Date.Today.AddDays(30) Then
' If dr1("证件期限_停止提示2") = False Then
cnt = cnt + 1
Dim sp As TimeSpan = dt - Date.Today
nms = nms & " " & cnt &"." & dr("中文简称") & ": 营业执照还有" & sp.TotalDays & "天到期" & vbcrlf
' End If
End If
Next
[此贴子已经被作者于2015/11/6 19:10:12编辑过]