title: Conversion failed when converting date and/or time from character string in Managed Instance- Why?
body: <p>I am trying to execute the following query in Managed Instance.</p>
  
  <pre><code>SELECT
  T.name
  FROM sys.tables T
  WHERE T.name NOT IN ('ElsevierExtracts')
  AND CAST(RIGHT(T.name,6) AS DATE) &lt; DATEADD(DAY,-8,GETDATE())
  AND T.type = 'U'
  </code></pre>
  
  <p>It throws an error as follows:</p>
  
  <blockquote>
    <p>Conversion failed when converting date and/or time from character
    string</p>
  </blockquote>
  
  <p>The query is included in a SSIS Package in a Execute SQL task but comes up with an error because of the conversion.</p>