参考:
http://www.foxtable.com/webhelp/topics/2720.htm
Dim y As Integer = Date.Today.year '指定年份
Dim m As Integer = Date.Today.month '指定月份
Dim dt1 As New Date(y, m, 1)
Dim dt2 As New Date(y, m, Date.DaysInMonth(y,m)) '获取该月的最后一天
Dim cnt15 As Integer = DataTables("入库").Compute("sum(入库金额)","日期 >= #" & dt1 & "# and 日期 <= #" & dt2 & "#")