Group by min query

  • Thread starter Thread starter Harold Ducote
  • Start date Start date
H

Harold Ducote

i have a table that does a time stamp when a record is created, now i want
to run a query but group it by minutes on the seconds here is how the data
looks in the table 2/5/2004 6:06:42 AM. Is there a way to group my query by
the minutes.

Harold Ducote
(e-mail address removed)
Frank's Casing Crew
Info Resources Coordinator
337-572-2313 phone
337-572-2462 fax.
 
THANKS A BUNCH... IT WORKED

Harold Ducote
(e-mail address removed)
Frank's Casing Crew
Info Resources Coordinator
337-572-2313 phone
337-572-2462 fax.


It'll be slow, but you can do it like this:

SELECT Format([TimeStamp], "nn") As Minutes, Sum([Some other field]) As
Total
FROM MyTable
GROUP BY Format([TimeStamp], "nn")

--
John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
http://www.deanforamerica.com/johnviescas
 
Back
Top