title: Calculate Difference between two times in Android
body: <p>I have two string variables such as StartTime and EndTime. I need to Calculate the TotalTime by subtracting the EndTime with StartTime.</p>
  
  <p>The Format of StartTime and EndTime is as like follows:</p>
  
  <pre><code>StartTime = "08:00 AM";
  EndTime = "04:00 PM";
  </code></pre>
  
  <p>TotalTime in Hours and Mins Format. How to calculate this in Android?</p>