Group by min query

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.
 
J

John Viescas

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
 
H

Harold Ducote

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

covert number to time 8
find records for today only 7
TIME QUERY 4
min query 2
Group by query question 1
Min/Max Dates and Group By 2
Group By, Max and Min 2
help with Group By query 6

Top