title: How to calculate time difference in VBA?
body: <p>I need to calculate the difference of two different times.</p>
  
  <p>For example, </p>
  
  <pre><code>time1 = 6:45 AM
  time2 = 7:30 AM
  </code></pre>
  
  <p>Then, i need to convert it to hours (integer)</p>
  
  <p>So in Basic Math, this is:</p>
  
  <pre><code>timediff = time2 - time1
  timediff = 0:45
  
  timediff(in hrs) = 0 + (45/60)
  timediff(in hrs) = 0.75
  </code></pre>
  
  <p>I need to do this in VBA. Can someone help me?
  Thanks a lot!</p>