用表达式算数据比较快,如何在datacols.add里面使用datadiff?我下面的代码报错:
---------------------------
提示
---------------------------
无法设置列"OR3D2complete"的表达式,原因:The expression contains undefined function call DateDiff().
---------------------------
OK
---------------------------
错误代码:
cmd.Con Name = "vis。。。。er"
cmd.CommandText = "。。。。Is not null"
dt = cmd.ExecuteReader()
dt.DataCols.Add("order2OR3D",Gettype(Integer),"DateDiff(d,[PO_receiveDate],[OR3D_start])")
dt.DataCols.Add("OR3D2complete",Gettype(Integer),"DateDiff(d,OR3D_start,OR3D_confirm)")
dt.DataCols.Add("or3d2oc",Gettype(Integer),"DateDiff(d,OR3D_confirm,OCstart)")
dt.DataCols.Add("oc2material",Gettype(Integer),"DateDiff(d,OCstart,iif(Material_available_date>Outlet_arrival,Outlet_arrival,Material_available_date))")
[此贴子已经被作者于2018/8/21 9:20:29编辑过]