title: Syntax error with SQL Server stored procedure
body: <p>I recently wrote a stored procedure with those parameters:</p>
  
  <pre><code>@dFromDT DATE,
  @dToDT DATE,
  @sErrorMessage NVARCHAR(MAX),
  @sPartCustom INT,
  @sPartCustomFilter NVARCHAR(254),
  @nIncludeMessage INT
  </code></pre>
  
  <p>I am trying to call the procedure with the line:  </p>
  
  <pre><code>EXEC _MG_ERPPartFilter(CONVERT(datetime, '2013-01-01T00:00:00', 126), CONVERT(datetime, '2050-12-31T00:00:00', 126), '',5, '556', 0)
  </code></pre>
  
  <p>And I always get that error message:  </p>
  
  <blockquote>
    <p>Incorrect syntax near the keyword 'CONVERT'.</p>
  </blockquote>
  
  <p>Even when I write this line:</p>
  
  <pre><code>EXEC _MG_ERPPartFilter('2013-01-01','2050-12-31', '',5, '556', 0)
  </code></pre>
  
  <p>I get that error:</p>
  
  <blockquote>
    <p>Incorrect syntax near '2013-01-01'.</p>
  </blockquote>
  
  <p>All the names are correct.</p>
  
  <p>Can someone help me?</p>