title: Difference between two DateTime objects in minutes
body: <pre><code>===========================================================
  Date_Time_from          | Date_Time_to
  ===========================================================
  2018-06-16 02:00:00     |2018-06-18 02:00:00
  2018-06-16 03:00:00     |2018-06-18 03:00:00
  2018-06-16 04:00:00     |2018-06-18 04:00:00
  2018-06-16 05:00:00     |2018-06-18 05:00:00
  2018-06-16 06:00:00     |2018-06-18 06:00:00
  ==========================================================
  </code></pre>
  
  <p>I am using LocalDateTime but instead of getting the difference of 2 <code>DateTime</code>, it only calculated the time. It did not count the day.</p>
  
  <p>Here's the code:</p>
  
  <pre><code>LocalDateTime fromdate = LocalDateTime.of(orderYear,orderMonth,orderDay,orderHour,orderMinute,orderSeconds);
  LocalDateTime todate = LocalDateTime.of(deliverYear, deliverMonth, deliverDay,deliverHour,deliverMinute,deliverSeconds);
  int a = fromdate.get(ChronoField.MINUTE_OF_DAY)-todate.get(ChronoField.MINUTE_OF_DAY);
  </code></pre>
  
  <p>The output of above code is zero since, in 2 hours in date_time_from equivalent to 120 mins subtracted to 2 hours in date_time_to.</p>
  
  <p>Is there another way to get the total minutes and include to compute the date?</p>