Date/Time Format issue

GoodLife22

Registered User.
Local time
Yesterday, 20:01
Joined
Mar 4, 2010
Messages
86
Please see my current query.

Code:
SELECT DATEADD("n", (DATEDIFF("n", 0, T.DateAdded)\60)*60, 0) AS [Hour Start], DateAdd("n",59,DATEADD("n", (DATEDIFF("n", 0, T.DateAdded)\60)*60, 0)) AS [Hour End], Count (*) AS [# of Calls]
FROM log_tbl AS T
GROUP BY (DATEDIFF("n", 0, T.DateAdded)\60)*60;
I need to count the number of calls between a time range. Data would need
to look like this:

[DateAdded]
1/10/08 07:38
1/11/08 07:15
1/12/08 08:47

I am trying to get to this (no date)
07:00-07:59 2
08:00-08:59 1


But with my current query I am getting:

Query1
Hour Start
Hour End # of Calls
3/25/2011 6:00:00 AM 3/25/2011 6:59:00 AM 96
3/25/2011 7:00:00 AM 3/25/2011 7:59:00 AM 2

So I need to drop off date portion of the date/time stamp.

Thank you to all.
 
that did it. Thank you sir.
 

Users who are viewing this thread

Back
Top Bottom