title: Conversion failed when converting date and/or time from character string even though result is correct
body: <p>This is my query:</p>
  
  <pre><code>set dateformat mdy;
      select cast([File Date] as date) as 'test' from gpdetail
  </code></pre>
  
  <p>which produces this error:</p>
  
  <blockquote>
    <p>Msg 241, Level 16, State 1, Line 2
        Conversion failed when converting date and/or time from character string.</p>
  </blockquote>
  
  <p>Any idea how to get rid of the error? any help much appreciated have been stuck on this for ages :(</p>
  
  <p><img src="https://i.stack.imgur.com/p98xP.png" alt="Under the results tab it shows the correct results"></p>
  
  <p>However, Under the results tab it shows the correct results</p>
  
  <p><img src="https://i.stack.imgur.com/evXga.png" alt="this is the actual data"></p>
  
  <p>This is the actual data</p>