title: Calculate time difference and return only hours and minutes (in VB.net)
body: <p>I'm developing a system to calculate time difference. How can I compare two time (with date) and get the hours &amp; minutes of the difference? </p>
  
  <p><strong>Example 1:</strong></p>
  
  <pre><code>datetime1 = 1-Apr-2014 01:05:04 AM
  datetime2 = 1-Apr-2014 02:05:04 AM
  </code></pre>
  
  <p>Results will be:</p>
  
  <pre><code>datetime2 - datetime1 = 01 Hours 00 Minutes
  </code></pre>
  
  <p><strong>Example 2:</strong></p>
  
  <pre><code>datetime1 = 1-Apr-2014 01:05:04 AM
  datetime2 = 2-Apr-2014 02:15:04 AM
  </code></pre>
  
  <p>Results will be:</p>
  
  <pre><code>datetime2 - datetime1 = 25 Hours 10 Minutes
  </code></pre>
  
  <p>A negative value (for datetime1 > datetime2) would also be helpful for indicating that datetime1 is greater than datetime2</p>
  
  <p><strong>Example:</strong></p>
  
  <pre><code>datetime1 = 2-Apr-2014 01:05:04 AM
  datetime2 = 1-Apr-2014 01:05:04 AM
  </code></pre>
  
  <p>Results will be:</p>
  
  <pre><code>datetime2 - datetime1 = -24 Hours 00 Minutes
  </code></pre>
  
  <p>Thank you!</p>