title: Difference between two Times in Minutes are coming as negative
body: <p>I have a method which takes two String parameters. the two strings are Time values in 24 hour format. The Times are picked using a TimePicker from UI.</p>
  
  <p>The goal of the method is to get the duration between the <code>StartTime</code> and <code>EndTime</code> in Minutes.</p>
  
  <pre><code>public static String getTimeDuration(String StartTime24, String EndTime24)
  {
      String duration = "";
  
      try 
      {
          SimpleDateFormat parseFormat = new SimpleDateFormat("HH:mm");
          Date startTime = parseFormat.parse(StartTime24);
          Date endTime = parseFormat.parse(EndTime24);
  
          long mills = endTime.getTime() - startTime.getTime();
          long minutes = mills/(1000 * 60);
  
          duration = "(" + minutes + " Minutes)";
      }
      catch(ParseException ex)
      {
          // exception handling here
      }
  
      return duration;
  }
  </code></pre>
  
  <p>The method works fine if both the times are within a Single Date. For example:</p>
  
  <pre><code>StartTime = 22:15
  EndTime = 23:51
  Output = (96 Minutes)
  </code></pre>
  
  <p>But my problem is, the method returns negative if the end time is after 12'o clock at night. For example,</p>
  
  <pre><code>StartTime = 23:51
  EndTime = 0:55
  Output = (-1376 Minutes)
  What I want: (64 Minutes)
  </code></pre>
  
  <p>How can get the duration correct ?</p>