SQL Server to convert date as text into date format that is recognised in Excel
<p>I've got data in SQL Server that is text formatted as <code>yyyy-mm-dd</code> I've converted this into UK date format as follows</p>

<pre><code>convert (varchar (10), main.Tbl_ServiceOrder.SOCreatedOn, 103) as SOCreated
</code></pre>

<p>I'm then importing the data into Excel via a SQL Server table, but although the date appears correctly (<code>dd/mm/yyyy</code>), Excel still recognises it as text. </p>

<p>I can convert it in Excel via DateValue but as the dataset is large I'm trying to get as much done in SQL.</p>