以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助][推荐] 转换成日出错 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=186960) |
-- 作者:sanny -- 发布时间:2023/6/11 9:52:00 -- [求助][推荐] 转换成日出错 老师,这个day 怎么出错了 ? dr212("day") = day("OrderDate")
|
-- 作者:有点蓝 -- 发布时间:2023/6/11 20:24:00 -- 出什么错?请贴出完整代码 |
-- 作者:sanny -- 发布时间:2023/6/13 12:04:00 -- 如下, Dim cmd12 As New SQLCommand Dim dtt12 As DataTable cmd12.C Dim Cols1A12() As String = {"dDate","cInvCode","iQuantity","cCusName","cPersonName","cSTName"} Dim Cols2A12() As String = {"OrderDate","PartNo","OrderQty","EndCustomer","Sales","销售类别"} cmd12.CommandText = "Se/lect dDate,cInvCode,iQuantity,cCusName,cPersonName,cSTName From (((({rdrecord32} Inner JOIN {rdrecords32} ON {rdrecords32}.[ID] = {rdrecord32}.[ID]) Inner JOIN {Customer} ON {Customer}.[cCusCode] = {rdrecord32}.[cCusCode]) Inner JOIN {Person} ON {Person}.[cPersonCode] = {rdrecord32}.[cPersonCode]) Inner JOIN {SaleType} ON {SaleType}.[cSTCode] = {rdrecord32}.[cSTCode]) Where dDate > \'2023/06/06\' " dtt12=cmd12.ExecuteReader() For Each dr112 As DataRow In dtt12.DataRows Dim dr212 As DataRow = DataTables("Orderlist2").AddNew() For i12 As Integer = 0 To Cols1A12.Length -1 dr212(Cols2A12(i12)) = dr112(Cols1A12(i12)) dr212("类别") = "销售出库" dr212("day") = day("OrderDate") Next Next [此贴子已经被作者于2023/6/13 12:04:01编辑过]
|
-- 作者:有点蓝 -- 发布时间:2023/6/13 12:09:00 -- 没看懂下面代码想实现什么功能? dr212("day") = day("OrderDate") 这个意思? dr212("day") = day(dr212("OrderDate"))
[此贴子已经被作者于2023/6/13 12:08:53编辑过]
|