title: Update SQL and converting nvarchar string to dateTime
body: <p>I insert data from CSV into SQL Server.</p>
  
  <p>The table <code>Tbl_art_tmp</code> is:</p>
  
  <pre><code>Art nchvar(50)  
  Qty nvarchar(50)
  importedDate nvarchar(50)
  </code></pre>
  
  <p>SQL query to insert</p>
  
  <pre><code>BULK INSERT Tbl_Art_tmp 
  FROM 'ExportArt.CSV' 
  WITH 
      (FIRSTROW = 1,  
       FIELDTERMINATOR = ';', 
       ROWTERMINATOR='0x0a');
  </code></pre>
  
  <p>The csv, exported from another software, contained</p>
  
  <pre><code>Art;Qty;importedDate
  10203R04-04; 0;2015-10-21
  10407T-10-100; 9;2016-02-01
  </code></pre>
  
  <p>I want to update another table <code>Tbl_art</code>, the table:</p>
  
  <pre><code>art nvarchar(30)
  Qty real
  lastUpdate datetime
  </code></pre>
  
  <p>My SQL query:</p>
  
  <pre><code>UPDATE a
  SET a.[qty] = CAST(atemp.[Qty] AS REAL),
      a.[lastUpdate] = CAST(atemp.[importedDate] AS DATETIME)
  FROM [Tbl_Art] a
  JOIN [Tbl_art_tmp] atemp ON a.[art] = atemp.[Art];
  </code></pre>
  
  <p>The update for Qty is ok not the datetime conversion</p>
  
  <blockquote>
    <p>Msg 241, Level 16, State 1, Line 3<br>
    Conversion failed when converting date and/or time from character string.</p>
  </blockquote>
  
  <p>Thank you for your help</p>