Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:小于日期问题

1楼
g1j2h3 发表于:2024/10/27 21:06:00
Dim y As Integer = Date.Today.Year
Dim m As Integer = Date.Today.Month 
Dim rq1 As New Date(y, m, 1)
Dim rq2 As New Date(y, m, Date.DaysInMonth(y, m)) '获取本月的最后一天
Dim Filter1 As String
Dim Filter2 As String
filter1 = "入库日期 >= #" & rq1 & "# " & " And 入库日期 <= #" & rq2 & "#"
filter2 = "出库日期 >= #" & rq1 & "# " & " And 出库日期 <= #" & rq2 & "#"

........
Dim s1 As Double = 0
    For Each cdr As DataRow In drs
        If cdr("入库日期") < rq1 Then
            s1 += cdr("入库数量")
        End If
    Next

请教大师,上边黑体大写的代码写法正确吗?
2楼
有点蓝 发表于:2024/10/27 21:12:00
语法没有问题
共2 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .02344 s, 2 queries.