Foxtable(狐表)用户栏目专家坐堂 → [求助][推荐] 转换成日出错


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

主题:[求助][推荐] 转换成日出错

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


加好友 发短信
等级:三尾狐 帖子:799 积分:5921 威望:0 精华:0 注册:2018/11/3 8:24:00
[求助][推荐] 转换成日出错  发帖心情 Post By:2023/6/11 9:52:00 [显示全部帖子]

老师,这个day 怎么出错了 ?

dr212("day") = day("OrderDate")

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


加好友 发短信
等级:三尾狐 帖子:799 积分:5921 威望:0 精华:0 注册:2018/11/3 8:24:00
  发帖心情 Post By: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


图片点击可在新窗口打开查看此主题相关图片如下:pci.jpg
图片点击可在新窗口打开查看




[此贴子已经被作者于2023/6/13 12:04:01编辑过]

 回到顶部