title: SQL PIVOT for days of the week
body: <p>Im trying to get the following output for the current week - </p>
  
  <pre><code>Full Name    | Mon           | Tue  | Wed           | Thu  | Fri  | Sat  | Sun
  Peter Smith  | 09:00 - 12:00 | NULL | 08:30 - 13:00 | NULL | NULL | NULL | 10:00 - 12:13
  Peter Smith  | 13:00 - 17:00 | NULL | 14:30 - 16:00 | NULL | NULL | NULL | 13:00 - 17:14
  Paul Stevens | 09:00 - 12:00 | NULL | 08:30 - 13:00 | NULL | NULL | NULL | 10:00 - 12:13
  </code></pre>
  
  <p>This is displaying clocking in logs, pulled from the table -</p>
  
  <pre><code>**ClockInLogs**
  ID - INT
  UserID - INT
  ClockDateTimeIn - DateTime
  ClockDateTimeOut - DateTime
  Status - INT (ClockedIn/ClockedOut)
  </code></pre>
  
  <p>Source data - </p>
  
  <pre><code>ID | UserID | ClockDateTimeIn         | ClockDateTimeOut        | Status
  1  | 10000  | 2013-07-30 13:40:39.913 | 2013-07-30 13:42:20.113 | 0
  2  | 10000  | 2013-07-30 14:13:10.947 | 2013-07-30 14:25:15.570 | 0
  3  | 10001  | 2013-07-30 14:13:52.817 | 2013-07-30 14:25:19.063 | 0
  </code></pre>
  
  <p>Full Name is pulled from a joined table called Users.</p>
  
  <p>Any ideas how I can get the desired output? I know I need to do a PIVOT but can't work out how to display the times within the cells.</p>
  
  <p>Thanks!</p>