SELECT CAST(Ptime as Date) AS dt, extract(hour from Ptime) as hr, floor(extract(minute from Ptime)/15) * 15 AS mn, count(*) as thecount FROM log WHERE CAST(Ptime As Date) >= '09/23/2010' GROUP BY CAST(Ptime as Date), extract(hour from Ptime), floor(extract(minute from Ptime)/15) * 15 ORDER BY dt, hr, mn
SELECT CAST(Ptime as DateTime) AS dt,datepart(month,CAST(Ptime as DateTime)),datepart(hour,CAST(Ptime as DateTime)),datepart(minute,CAST(Ptime as DateTime))
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)