Foxtable(狐表)用户栏目专家坐堂 → 日期的比较?谢谢


  共有15695人关注过本帖平板打印复制链接

主题:日期的比较?谢谢

帅哥哟,离线,有人找我吗?
杨浩
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:一尾狐 帖子:483 积分:2913 威望:0 精华:0 注册:2008/9/21 16:18:00
日期的比较?谢谢  发帖心情 Post By:2009/8/28 8:20:00 [只看该作者]

 

Dim timeC As Date =Date.Today

Dim timeD As Date = e.Form.Controls("报送时间").Value

Dim timeE As Date = e.Form.Controls("审核时间").Value

Dim timeF As Data = TimeC.AddDays(7)   '加上7天

Dim  timeAA  As TimeSpan  =  timeF – timeD

Dim  timeBB  As TimeSpan  =  timeE – timeD

IF timeD < timeC then

MessageBox.Show("上报时间不能小于当前时间!!!", "提示", MessageBoxButtons.OK,MessageBoxIcon.Information)

Return       '终止代码的执行

Else

If  timeAA.Days  > 7  then

MessageBox.Show("上报时间过于延后!!!", "提示", MessageBoxButtons.OK,MessageBoxIcon.Information)

Return       '终止代码的执行

Else

If timeE < timeD then

MessageBox.Show("审核时间不能小于上报时间!!!", "提示", MessageBoxButtons.OK,MessageBoxIcon.Information)

Return       '终止代码的执行

Else

If timeBB.Days > 18 then

MessageBox.Show("审核时间与上报时间间隔过长!!!", "提示", MessageBoxButtons.OK,MessageBoxIcon.Information)

Return       '终止代码的执行

End if

End if

End if

End if

 


 回到顶部
总数 19 1 2 下一页