still the same error message here is the sql query that i'm running
SELECT txtusername.txtusername, Format([Duration]\3600,"0\:") &
Format([Duaration] Mod 60,"00") AS Expr1
FROM ((txtusername INNER JOIN (dbo_Connections INNER JOIN dbo_Workstations
ON dbo_Connections.Workstation_Id = dbo_Workstations.Workstation_Id) ON
txtusername.txtusername = dbo_Workstations.User_Name) INNER JOIN dbo_Pages
ON dbo_Connections.Page_Id = dbo_Pages.Page_Id) INNER JOIN dbo_Sites ON
dbo_Pages.Site_Id = dbo_Sites.Site_Id
GROUP BY txtusername.txtusername
ORDER BY Format([Duration]\3600,"0\:") & Format([Duaration] Mod 60,"00")
DESC;
Harold Ducote
(e-mail address removed)
Frank's Casing Crew
Info Resources Coordinator
337-572-2313 phone
337-572-2462 fax.
Some additional info re: using the ":00" format approach. In working
through
another poster's problem, I found out that the ":00" format will always
return ":00" regardless of the value that is being formatted.
I had to do it this way:
Format([Duration] \ 3600, "0:") & Format([Duaration] Mod 60, "00")
--
Ken Snell
<MS ACCESS MVP>
John Vinson said:
I have the following Sum([Duration]/3600) and it gives me a number in a
query. How would I also format this to short time to maybe show like 1:30.
is there a way to do this.
How is [Duration] calculated? Am I right in guessing that it's a count
of seconds, and you want to see it in hours and minutes?
If so, construct a String using an expression
[Duration] \ 3600 & Format(([Duration] \ 60) MOD 60, ":00")