W
Wylie C
I have a query that looks at another query field called Tseconds. The query
calculates three values from the Tseconds field: Hours, Minutes and seconds.
The problem I have is that if the minutes and seconds are less than 10, then
only the single number is displayed. For example I get 2:3:1 instead of
2:03:01. I have worked at different formats with no avail. Below is the code
I am working with...
SELECT DISTINCTROW Year([Statistics].[StatDate]) AS [Year],
Sum([Statistics].[Mileage]) AS [Timed Miles Ridden], Sum([Statistics].[Total
Miles]) AS [All Miles Ridden],
([qryYearlyMileageTotalsTrial]![SumOfESeconds]\3600) & ":" &
(([qryYearlyMileageTotalsTrial]![SumOfESeconds] Mod 3600)\60) & ":" &
([qryYearlyMileageTotalsTrial]![SumOfESeconds] Mod 60) AS [Hours Ridden]
FROM Statistics, qryYearlyMileageTotalsTrial
GROUP BY Year([Statistics].[StatDate]),
([qryYearlyMileageTotalsTrial]![SumOfESeconds]\3600) & ":" &
(([qryYearlyMileageTotalsTrial]![SumOfESeconds] Mod 3600)\60) & ":" &
([qryYearlyMileageTotalsTrial]![SumOfESeconds] Mod 60),
Format$([Statistics].[StatDate],'yyyy')
ORDER BY Year([Statistics].[StatDate]) DESC;
Thank you.
calculates three values from the Tseconds field: Hours, Minutes and seconds.
The problem I have is that if the minutes and seconds are less than 10, then
only the single number is displayed. For example I get 2:3:1 instead of
2:03:01. I have worked at different formats with no avail. Below is the code
I am working with...
SELECT DISTINCTROW Year([Statistics].[StatDate]) AS [Year],
Sum([Statistics].[Mileage]) AS [Timed Miles Ridden], Sum([Statistics].[Total
Miles]) AS [All Miles Ridden],
([qryYearlyMileageTotalsTrial]![SumOfESeconds]\3600) & ":" &
(([qryYearlyMileageTotalsTrial]![SumOfESeconds] Mod 3600)\60) & ":" &
([qryYearlyMileageTotalsTrial]![SumOfESeconds] Mod 60) AS [Hours Ridden]
FROM Statistics, qryYearlyMileageTotalsTrial
GROUP BY Year([Statistics].[StatDate]),
([qryYearlyMileageTotalsTrial]![SumOfESeconds]\3600) & ":" &
(([qryYearlyMileageTotalsTrial]![SumOfESeconds] Mod 3600)\60) & ":" &
([qryYearlyMileageTotalsTrial]![SumOfESeconds] Mod 60),
Format$([Statistics].[StatDate],'yyyy')
ORDER BY Year([Statistics].[StatDate]) DESC;
Thank you.