Viewing 3 posts - 1 through 3 (of 3 total)
I think I might have got it
SELECT userID, SUM(Correct) AS CORRECT, SUM(Wrong) as Wrong, SUM(AssitanceNeeded) AS AssitanceNeeded
FROM Charts
where TimeDateStamp between
dateadd(month, -11, DATEADD(mm, DATEDIFF(mm,0,getdate()), 0))
and
dateadd(ss,-1, DATEADD(mm, DATEDIFF(mm,0,getdate()) + 1, 0))
GROUP...
January 26, 2008 at 8:01 pm
antonio.collins (1/26/2008)
run these statements:
select dateadd(month, -12,
dateadd(day,1 - day(getdate()), ...
January 26, 2008 at 6:52 pm
antonio.collins (1/26/2008)
WHERE TimeDateStamp
BETWEEN DATEADD(mm, DATEDIFF(mm,0,getdate()), 0)
AND
DATEADD(ms,-3,DATEADD(mm,DATEDIFF(m,0,getdate()) +1, 0))
try this instead:
where TimeDateStamp <=
dateadd(month, -12,
dateadd(day,1 - day(getdate()),
...
January 26, 2008 at 6:18 pm
Viewing 3 posts - 1 through 3 (of 3 total)