Dim a As Date = Tables("订单").Current("日期") Dim b as Date = Date.Today Tables("订单").Filter = "[日期] >= # " & a.AddDays(-a.dayofweek+1) & " # And [日期] <= # " & a.AddDays(-a.dayofweek+7) &" #"
同季:
Dim a As Date = Tables("订单").Current("日期") Dim b As integer = (a.Month-1) \ 3 Dim c As New Date(a.Year,b*3+1,1) Dim d As New Date(a.Year,b*3+3,Date.DaysInMonth(a.year,b*3+3)) Tables("订单").Filter = "[日期] >= # " & c & " # And [日期] <= # " & d & "#"
4楼
czy 发表于:2010/2/28 0:51:00
同月
Dim a As Date = Tables("订单").Current("日期") a = New Date(a.year,a.month,1) Dim b as Date = New Date(a.year, a.month, Date.DaysInMonth(a.year, a.Month)) Tables("订单").Filter = "[日期] >= # " & a & " # And [日期] <= # " & b & "#"