Dim y As Integer = Date.Today.year'指定年份 Dim m As Integer = Date.Today.month'指定月份 Dim dt1 As NewDate(y, m, 1) Dim dt2 As NewDate(y, m, Date.DaysInMonth(y,m)) '获取该月的最后一天
Dim cnt15 As Integer = DataTables("入库").Compute("sum(入库金额)","日期 >= #" & dt1 & "# and 日期 <= #" & dt2 & "#")