Welcome to WebmasterWorld Guest from 126.96.36.199
Forum Moderators: open
SELECT COUNT(*) AS ct, DateIn
WHERE (DATEDIFF(DAY, DateIn, GETDATE()) < 7)
GROUP BY DateIn
this returns the last 7 days action but it shows as
how can i get it to group to 01/09/2005 is the something that i could change in the default insetad of getdate()?
This now show the last 14 days of stats!
Ok moving on to my next issue.
from this query i now want to link into another page to show stast for that day!
so, link being?d=15(axample).
when on the next page the sql query to retrieve the results for day 15, i have put as :
SELECT * FROM tblInsuranceStats
(Datepart(day,datein) = '::D::')
If i replace the '::D::' with a number it works, so it must be the '::D::' thats the problem?
Why is this not working? Any ideas?