Calculation question

B

Billy B

I am trying to group time information by year. I have a field containting
seconds and have figured out how to show hours and minutes in the query but
cannot figure out how to get the seconds calculated. After getting that
calculation I can concantenate the fields and add the necessary characters.
Below is the sql query in Access 2000.
Thank you.

SELECT DISTINCTROW Year(Statistics.StatDate) AS [Year],
Sum(Statistics.Mileage) AS [Timed Miles], Sum(Statistics.[Total Miles]) AS
[Total Miles], Sum(Statistics.ESeconds) AS SumOfESeconds,
Sum(Statistics.TSeconds) AS SumOfTSeconds, Format(Sum([TSeconds]\3600),"00")
AS THrs, [THrs] & ":" & [TMin] AS [Total Hours], Format(Sum([TSeconds] Mod
3600\60),"00") AS TMin, Sum(Statistics.Elevation) AS [Total Elevation]
FROM Statistics
GROUP BY Year(Statistics.StatDate)
ORDER BY Year(Statistics.StatDate) DESC;
 

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

Top