以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]时间型比较  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=111675)

--  作者:ymjr2011
--  发布时间:2017/12/27 16:11:00
--  [求助]时间型比较
如果字段为日期时间型且时间日期格式为time   为什么 在做比较时会有问题  If e.DataRow("卡二") < "16:30" Then e.DataRow("早退") = True

明明是18:30,居然判断为早退了

--  作者:有点甜
--  发布时间:2017/12/27 16:32:00
--  

试试

 

If format(e.DataRow("卡二"), "mmss") < "16:30" Then

    e.DataRow("早退") = True

[此贴子已经被作者于2017/12/27 16:32:01编辑过]