Right now I am working on a query that figures out average time for how long it takes an athlete to run a mile.
The query works fine, all the calculations are done correctly, however, the formatting is incorrect.
If the average time to run a mile is 7 minutes and 5 seconds, it should be displayed as "7:05", however, the way it is set up now it displays "7:5". Here is the how I set up the query:
There are two fields: FinalTimeInMinutes and Seconds
I then use a lot of expressions:
Expr1 = [FinalTimeInMinutes * 60] + Seconds = TotalTimeInSeconds
Expr2 = [TotalTimeInSeconds]/[Distance] = TimeInSecondsPerMile
Expr3 = Fix([TimeInSecondsPerMile]/60)
Expr4 = [TimeInSecondsPerMile] Mod 60
AverageTime = Expr3 & ":" & Expr4
What do I add to my code so that if Expr4 is between 0 and 9, it is displayed at 00, 01, 02... 09?
The query works fine, all the calculations are done correctly, however, the formatting is incorrect.
If the average time to run a mile is 7 minutes and 5 seconds, it should be displayed as "7:05", however, the way it is set up now it displays "7:5". Here is the how I set up the query:
There are two fields: FinalTimeInMinutes and Seconds
I then use a lot of expressions:
Expr1 = [FinalTimeInMinutes * 60] + Seconds = TotalTimeInSeconds
Expr2 = [TotalTimeInSeconds]/[Distance] = TimeInSecondsPerMile
Expr3 = Fix([TimeInSecondsPerMile]/60)
Expr4 = [TimeInSecondsPerMile] Mod 60
AverageTime = Expr3 & ":" & Expr4
What do I add to my code so that if Expr4 is between 0 and 9, it is displayed at 00, 01, 02... 09?