Error with Format as Timespan in Datagridview
<p>I'm getting this error</p>

<p><a href="https://i.stack.imgur.com/1SyGA.jpg" rel="nofollow"><img src="https://i.stack.imgur.com/1SyGA.jpg" alt="enter image description here"></a></p>

<p>with the following line of code</p>

<pre><code>co.DefaultCellStyle.Format = "HH:mm"
</code></pre>

<p>co is defined as follows</p>

<pre><code>Dim co As DataGridViewColumn = Me.Columns(fi.colDbName)
</code></pre>

<p>The error-message says that the Inputstring has the wrong format.</p>

<p>This line of code has been running for a couple of years now. Also, I didn't really make any changes with this app for the past year. So I assume it has something to do with either Windows 10 or VS 2015. </p>

<p><strong>Update:</strong>
I think the problem might come from the different sql server version running on the test system.</p>

<p>Code works with</p>

<pre><code>Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64)   Apr  2 2010 15:48:46   Copyright (c) Microsoft Corporation  Express Edition with Advanced Services (64-bit) on Windows NT 6.1 &lt;X64&gt; (Build 7601: Service Pack 1) 
</code></pre>

<p>Code does not work with </p>

<pre><code>Microsoft SQL Server 2014 - 12.0.2269.0 (Intel X86)   Jun 10 2015 03:19:53   Copyright (c) Microsoft Corporation  Express Edition on Windows NT 6.1 &lt;X86&gt; (Build 7601: Service Pack 1) 
</code></pre>

<p>Upate:
The column is defined as <code>Time(7)</code> in the database</p>

<p>Any Ideas?</p>