format minutes to Hour:Min in crosstab

S

Song Su

I have a crosstab query as follows:

TRANSFORM Sum(tblUnionData.minutes) AS SumOfminutes
SELECT tblUnionData.Last, tblUnionData.First, tblUnionData.SID,
Sum(tblUnionData.minutes) AS [Total Of minutes]
FROM tblUnionData
GROUP BY tblUnionData.Last, tblUnionData.First, tblUnionData.SID
PIVOT tblUnionData.Sect;

the result of it looks like this:

Last First SID TotalOfMinutes 5950
8950 9867
Acedo Sandra 888453116 189 121 68
Aguilar Dulce 885476796 100
57 43
"
"
This result will be exported to Excel. However, before exporting, I want to
convert minutes to Hr:Min like:

Last First SID Hr:Min 5950
8950 9867
Acedo Sandra 888453116 3:09 2:01 1:08
Aguilar Dulce 885476796 1:40
0:57 0:43
"
"

Any help would be appreciated.
 

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