pedie
Well-known Member
- Joined
- Apr 28, 2010
- Messages
- 3,875
Please help me achieve this.
When i run query i get Total Time in Decimals... HOw can i get it in Time Format as in HH:MM:SS.
Thanks in advance.
Current:
<TABLE cellSpacing=0 bgColor=#ffffff border=1><CAPTION>Query1</CAPTION><THEAD><TR><TH borderColor=#000000 bgColor=#c0c0c0>Login Date</TH><TH borderColor=#000000 bgColor=#c0c0c0>SumOfTotal Time</TH></TR></THEAD><TBODY><TR vAlign=top><TD borderColor=#d0d7e5>10Jan12</TD><TD borderColor=#d0d7e5 align=right>1.04166666666667E-03</TD></TR><TR vAlign=top><TD borderColor=#d0d7e5>30Dec11</TD><TD borderColor=#d0d7e5 align=right>0.337465277777778</TD></TR><TR vAlign=top><TD borderColor=#d0d7e5>31Dec11</TD><TD borderColor=#d0d7e5 align=right>4.93287037037037E-02</TD></TR></TBODY><TFOOT></TFOOT></TABLE>
Result Expected:
<TABLE style="WIDTH: 109pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=145 border=0><COLGROUP><COL style="WIDTH: 42pt; mso-width-source: userset; mso-width-alt: 2048" width=56><COL style="WIDTH: 67pt; mso-width-source: userset; mso-width-alt: 3254" width=89><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl64 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black 0.5pt solid; BORDER-LEFT: black 0.5pt solid; WIDTH: 42pt; BORDER-BOTTOM: black 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: silver" width=56 height=17>Login Date</TD><TD class=xl66 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black 0.5pt solid; BORDER-LEFT: black; WIDTH: 67pt; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: silver" width=89>SumOfTotal Time</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl65 style="BORDER-RIGHT: silver 0.5pt solid; BORDER-TOP: silver 0.5pt solid; BORDER-LEFT: silver 0.5pt solid; WIDTH: 42pt; BORDER-BOTTOM: silver 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=56 height=17>10Jan12</TD><TD class=xl67 style="BORDER-RIGHT: silver 0.5pt solid; BORDER-TOP: silver 0.5pt solid; BORDER-LEFT: silver; WIDTH: 67pt; BORDER-BOTTOM: silver 0.5pt solid; BACKGROUND-COLOR: transparent" width=89>0:01:30</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl65 style="BORDER-RIGHT: silver 0.5pt solid; BORDER-TOP: silver; BORDER-LEFT: silver 0.5pt solid; WIDTH: 42pt; BORDER-BOTTOM: silver 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=56 height=17>30Dec11</TD><TD class=xl67 style="BORDER-RIGHT: silver 0.5pt solid; BORDER-TOP: silver; BORDER-LEFT: silver; WIDTH: 67pt; BORDER-BOTTOM: silver 0.5pt solid; BACKGROUND-COLOR: transparent" width=89>8:05:57</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl65 style="BORDER-RIGHT: silver 0.5pt solid; BORDER-TOP: silver; BORDER-LEFT: silver 0.5pt solid; WIDTH: 42pt; BORDER-BOTTOM: silver 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=56 height=17>31Dec11</TD><TD class=xl67 style="BORDER-RIGHT: silver 0.5pt solid; BORDER-TOP: silver; BORDER-LEFT: silver; WIDTH: 67pt; BORDER-BOTTOM: silver 0.5pt solid; BACKGROUND-COLOR: transparent" width=89>1:11:02</TD></TR></TBODY></TABLE>
When i run query i get Total Time in Decimals... HOw can i get it in Time Format as in HH:MM:SS.
Thanks in advance.
Code:
[/FONT]
[FONT=Courier New]SELECT Table1.[Login Date], Sum(Table1.[Total Time]) AS [SumOfTotal Time]
FROM Table1
GROUP BY Table1.[Login Date];
Current:
<TABLE cellSpacing=0 bgColor=#ffffff border=1><CAPTION>Query1</CAPTION><THEAD><TR><TH borderColor=#000000 bgColor=#c0c0c0>Login Date</TH><TH borderColor=#000000 bgColor=#c0c0c0>SumOfTotal Time</TH></TR></THEAD><TBODY><TR vAlign=top><TD borderColor=#d0d7e5>10Jan12</TD><TD borderColor=#d0d7e5 align=right>1.04166666666667E-03</TD></TR><TR vAlign=top><TD borderColor=#d0d7e5>30Dec11</TD><TD borderColor=#d0d7e5 align=right>0.337465277777778</TD></TR><TR vAlign=top><TD borderColor=#d0d7e5>31Dec11</TD><TD borderColor=#d0d7e5 align=right>4.93287037037037E-02</TD></TR></TBODY><TFOOT></TFOOT></TABLE>
Result Expected:
<TABLE style="WIDTH: 109pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=145 border=0><COLGROUP><COL style="WIDTH: 42pt; mso-width-source: userset; mso-width-alt: 2048" width=56><COL style="WIDTH: 67pt; mso-width-source: userset; mso-width-alt: 3254" width=89><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl64 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black 0.5pt solid; BORDER-LEFT: black 0.5pt solid; WIDTH: 42pt; BORDER-BOTTOM: black 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: silver" width=56 height=17>Login Date</TD><TD class=xl66 style="BORDER-RIGHT: black 0.5pt solid; BORDER-TOP: black 0.5pt solid; BORDER-LEFT: black; WIDTH: 67pt; BORDER-BOTTOM: black 0.5pt solid; BACKGROUND-COLOR: silver" width=89>SumOfTotal Time</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl65 style="BORDER-RIGHT: silver 0.5pt solid; BORDER-TOP: silver 0.5pt solid; BORDER-LEFT: silver 0.5pt solid; WIDTH: 42pt; BORDER-BOTTOM: silver 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=56 height=17>10Jan12</TD><TD class=xl67 style="BORDER-RIGHT: silver 0.5pt solid; BORDER-TOP: silver 0.5pt solid; BORDER-LEFT: silver; WIDTH: 67pt; BORDER-BOTTOM: silver 0.5pt solid; BACKGROUND-COLOR: transparent" width=89>0:01:30</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl65 style="BORDER-RIGHT: silver 0.5pt solid; BORDER-TOP: silver; BORDER-LEFT: silver 0.5pt solid; WIDTH: 42pt; BORDER-BOTTOM: silver 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=56 height=17>30Dec11</TD><TD class=xl67 style="BORDER-RIGHT: silver 0.5pt solid; BORDER-TOP: silver; BORDER-LEFT: silver; WIDTH: 67pt; BORDER-BOTTOM: silver 0.5pt solid; BACKGROUND-COLOR: transparent" width=89>8:05:57</TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD class=xl65 style="BORDER-RIGHT: silver 0.5pt solid; BORDER-TOP: silver; BORDER-LEFT: silver 0.5pt solid; WIDTH: 42pt; BORDER-BOTTOM: silver 0.5pt solid; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=56 height=17>31Dec11</TD><TD class=xl67 style="BORDER-RIGHT: silver 0.5pt solid; BORDER-TOP: silver; BORDER-LEFT: silver; WIDTH: 67pt; BORDER-BOTTOM: silver 0.5pt solid; BACKGROUND-COLOR: transparent" width=89>1:11:02</TD></TR></TBODY></TABLE>