title: Convert date to day name e.g. Mon, Tue, Wed
body: <p>I have a variable that outputs the date in the following format:</p>
  
  <pre><code>201308131830
  </code></pre>
  
  <p>Which is 2013 - Aug - 13 - 18:30</p>
  
  <p>I am using this to retrieve the day name but it is getting the wrong days:</p>
  
  <pre><code>$dayname = date('D', strtotime($longdate));
  </code></pre>
  
  <p>Any idea what I am doing wrong?</p>