title: How to Split Time and calculate time difference in sql server 2005?
body: <p>i want to split the time and calculate time difference using sql server 2005</p>
  
  <p>my default output is like this:</p>
  
  <pre><code>EnrollNo     AttDateFirst                          AttDateLast
  111      2011-12-09 08:46:00.000          2011-12-09 08:46:00.000
  112      2011-12-09 08:40:00.000          2011-12-09 17:30:00.000
  302      2011-12-09 09:00:00.000          2011-12-09 18:30:00.000
  303      2011-12-09 10:00:00.000          2011-12-09 18:35:00.000
  </code></pre>
  
  <p>I want my new output to be like this:</p>
  
  <pre><code>Enroll No     .....      FirtTime       LastTime      Time Diff
  111           .....      8:46:00          8:45:00     00:00:00
  112           .....      8:30:00         17:30:00      9:00:00
  302           .....      9:00:00         18:30:00      9:30:00 
  303           .....     10:00:00         18:35:00      8:35:00
  </code></pre>