Time Duration problem
<p>I am not able to get the correct Time duration.So can anyone please help me in finding the solution</p>

<p>//code</p>

<pre><code> public static String getDateDifference(java.util.Date start, java.util.Date end) {
    logger.info("Enter getDateDifference ");
    Calendar startCal = Calendar.getInstance();
    startCal.setTime(start);
    Calendar endCal = Calendar.getInstance();
    endCal.setTime(end);

    int hourDiff = Math.abs(endCal.get(Calendar.HOUR_OF_DAY) - startCal.get(Calendar.HOUR_OF_DAY));
    int minDiff = Math.abs(endCal.get(Calendar.MINUTE) - startCal.get(Calendar.MINUTE));
    String diff = Integer.toString(hourDiff) + ":" + Integer.toString(minDiff);

    logger.info("Date Difference : " + diff);
    logger.info("Exit getDateDifference ");
    return diff;
}
</code></pre>
