GridView DataFormatString problems. convert Doudle to TimeStamp
<p>Need some help with DataFormatString in GridView. I have a Double value that needs to be shown as TimeSpan. I have tried DataFormatString="{0:HH:mm:ss}". This did not work. </p>

<p>Tested it a bit in C# and there I would do:</p>

<pre><code>TimeSpan.FromHours(16.7358217592592).ToString()
</code></pre>

<p>This gives me.</p>

<pre><code>"16:44:08.9580000"
</code></pre>

<p>Which is what i am after. But how to get it in ASP.Net is the big question.
Any Suggestions?</p>

<p>I have a simple GridView that looks like this.</p>

<pre><code>&lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"&gt;
&lt;Columns&gt;
    &lt;asp:BoundField DataField="sOprTime" HeaderText="Sum OprTime" ReadOnly="True" SortExpression="sOprTime" /&gt;
    &lt;asp:BoundField DataField="sWorkTime" HeaderText="Sum WorkTime" ReadOnly="True" SortExpression="sWorkTime" /&gt;
    &lt;asp:BoundField DataField="sFaultTime" HeaderText="Sum FaultTime" ReadOnly="True" SortExpression="sFaultTime" /&gt;
&lt;/Columns&gt;
&lt;EmptyDataTemplate&gt;
    No data is present.
&lt;/EmptyDataTemplate&gt;
</code></pre>

<p></p>

<p>The SQL query looks like this:</p>

<pre><code>sqlString1 = string.Format(@"SELECT SUM(CONVERT (Float, OprTime)) AS sOprTime, SUM(CONVERT (Float, WorkTime)) AS sWorkTime, SUM(CONVERT (Float, OprTime)) - SUM(CONVERT (Float, WorkTime)) AS sFaultTime FROM tblNovikLogg WHERE (Date_Time &gt; '{0:yyyy/MM/dd H:mm:ss}' And Date_Time &lt; '{1:yyyy/MM/dd H:mm:ss}')",  selectedDate, selectedDate.AddDays(1));
</code></pre>
