title: How to Select records of a certain format in MS SQL Server
body: <p>May I ask some little help on how can I get certain result format using my table design.</p>
  
  <p>I have <code>T_EmployeeDTRLogs</code> table where the current design is the following:</p>
  
  <pre><code>| edl_EmployeeID |  edl_LogDate  |    edl_LogTime    |  edl_LogType  |
  |     KMP0047    |   2014-05-05  |  07:35:12.1200000 |      IN       |
  |     KMP0047    |   2014-05-05  |  15:06:23.3470000 |      OUT      |
  </code></pre>
  
  <p>Using the table design and given records I want to generate report or result into the following format:</p>
  
  <pre><code>| edl_EmployeeID |  edl_LogDate  |   In    |    Out   | 
  |    KMP0047     |   2014-05-05  | 7:35:12 |  3:06:23 |
  </code></pre>
  
  <p>I am having problem on how can I generate this kind of result.</p>
  
  <p>Can I have some your advises and help on how to can I generate this report.</p>
  
  <p>Thank you very much in advance.</p>