以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  日期比较  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=103507)

--  作者:实话实说
--  发布时间:2017/7/10 15:00:00
--  日期比较

以下代码是根据完工日期与交货日期的比较来勾选按期完工列,完工日期<=交货日期,则勾选[按期完工]

红色代码行怎么写?

If e.DataCol.Name = "完工日期" Then
    If e.DataRow.IsNull("交货日期") Then
        e.DataRow("按期完工") = False
    Else
        If e.DataRow("完工日期") - e.DataRow("交货日期") <=0 Then
            e.DataRow("按期完工") = True                
        End If
    End If
End If


--  作者:有点甜
--  发布时间:2017/7/10 15:55:00
--  

If e.DataRow("完工日期") <= e.DataRow("交货日期") Then

 

或者

 

http://www.foxtable.com/webhelp/scr/0287.htm