title: How to find difference between two Joda-Time DateTimes in minutes
body: <p>Below is the method I wrote: </p>
  
  <pre><code>public List&lt;Map&lt;String, Object&gt;&gt; loadNotYetInEmployee(int shift, Date date,
          int transitionVal, String type, User user) {
  
      DateTime datetime = new DateTime(date);
      datetime = datetime
              .plus(Period.minutes(shiftTiming.getSession1InTime()));
  
      List&lt;Map&lt;String, Object&gt;&gt; result = new ArrayList&lt;Map&lt;String, Object&gt;&gt;();
  
      sql = SqlMapUtils.getSql("attendance.attendancestatus.latein",
              parameters);
      result = getJdbcTemplate().queryForList(sql);
      for (int i = 0; i &lt; result.size(); i++) {
          Date punchInTime = (Date) result.get(i).get("punchtime");
          DateTime punchTime = new DateTime(punchInTime);
      }
      return result;
  }
  </code></pre>
  
  <p>Now from my method you can see I have a <a href="http://www.joda.org/joda-time/" rel="noreferrer">Joda-Time</a> <a href="http://www.joda.org/joda-time/apidocs/org/joda/time/DateTime.html" rel="noreferrer">DateTime</a> object in object named <code>datetime</code> and from my result I am getting one timestamp which I am converting to jodatime <code>punchTime</code>. Now I want to find out the diff between these two dates, how do I do that?</p>