title: how to find out all the time duration available for given date and start and end time : java
body: <p>I have date and time in the format of Start Date and Time<code>15-05-15 02:00:AM</code>
  End Date and Time <code>15-05-15 06:00:AM. with the time interval of</code>60 minutes`</p>
  
  <p>how do i find out the hours available between these two dates and times?</p>
  
  <p>the result would be</p>
  
  <pre><code>start Time : 15-05-15 02:00:AM end Time : 15-05-15 03:00:AM
  start Time : 15-05-15 03:00:AM end Time : 15-05-15 04:00:AM
  start Time : 15-05-15 05:00:AM end Time : 15-05-15 06:00:AM
  </code></pre>
  
  <p>please help me to handle in case the start date time and end date time range falls in next day range.</p>
  
  <p>I am using <code>java 7</code></p>
  
  <p>Thanks</p>