Is there a simpel way to select and sum rows where the date is in a specific week number?
Something like this code?
mysum = RS.execute("Select Sum(mypoints) as sumpoints from MyTable WHERE
datepart(week, mydate) = '42'")("sumpoints")
Correct syntax for SQL statement and DatePart() function - uses default first day of week of Sunday:
SELECT Sum(mypoints) AS sumpoints FROM MyTable WHERE DatePart("ww", mydate) = 42