title: The data types varchar and datetimeoffset are incompatible in the add operator
body: <p>While I am trying to use dynamic query code in my SQL statement </p>
  
  <pre><code>Declare @Start datetimeoffset;
  Declare @End datetimeoffset;
  Declare @SqlCommand nvarchar(Max);
  
  Set @Start = '2013-05-17 10:00:04.500 +00:00';
  Set @End = '2013-09-17 10:00:04.500 +00:00'
  Set @SqlCommand = 'Select * from Test where TimeLine &gt; '+ @Start+' AND TimeLine &lt; '+@End
  
  Exec(@SqlCommand)
  </code></pre>
  
  <p>I get below message saying </p>
  
  <blockquote>
    <p>Msg 402, Level 16, State 1, Line 8<br>
    The data types varchar and datetimeoffset are incompatible in the add operator.</p>
  </blockquote>
  
  <p>please guide me the correct usage. </p>