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


  共有16161人关注过本帖树形打印复制链接

主题:日期的比较?谢谢

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


加好友 发短信
等级:一尾狐 帖子:483 积分:2913 威望:0 精华:0 注册:2008/9/21 16:18:00
  发帖心情 Post By:2009/8/28 14:18: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 Date = TimeC.AddDays(7)   '加上7天

Dim  timeAA  As  TimeSpan  =  timeF – timeD


当前时间加上7天应该比上报时间大!!!

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


加好友 发短信
等级:一尾狐 帖子:483 积分:2913 威望:0 精华:0 注册:2008/9/21 16:18:00
  发帖心情 Post By:2009/8/28 14:25: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 Date = TimeC.AddDays(7)   '加上7天

Dim  timeBB  As  TimeSpan  =  timeE – timeD

IF timeD < timeC then

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

Return       '终止代码的执行

Else

If  timeD  >  timeF  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


 回到顶部
总数 13 上一页 1 2