title: Why CAST function behaves different when called within a sproc?
body: <p>When I call the CONVERT function with the style 127, from management studio like below:</p>
  
  <pre><code>select top 1 * , CONVERT(varchar(255), ManufactureTime, 127)as ManufactureTime
  from Machines
  </code></pre>
  
  <p>Output for the ManucaftureTime is: 
  '2015-06-08 10:00:01'</p>
  
  <p>However when I do the same call from a sproc and when I execute the sproc I get in a different style:</p>
  
  <p>'2015-06-08<strong>T</strong>10:00:01' (That is ISO8601 with time zone Z.)</p>
  
  <p>Any idea why the behavior of CONVERT differs when called from stored-procedure?</p>
  
  <p>Thanks</p>