title: Convert date to day of week into SQL Server
body: <p>I would like to convert a SQL query in MS Access into SQL Server. This query is about converting date into day of week. Please advise.</p>
  
  <p>MS Access:</p>
  
  <pre><code>UPDATE Contact_Hist 
  SET WK_DAY = weekdayname(weekday(cdate(mid(date_id,5,2) &amp; "/" &amp; right(date_id,2) &amp; "/" &amp; left(date_id,4))));
  </code></pre>
  
  <p>For instance, <code>DATE_ID = 20140703</code> as per the table (<code>Contact_Hist</code>) and would like to convert to the day of week i.e. <code>'Thursday'</code>.</p>