Here you can find the source of convertToHours(long workingDuration)
public static double convertToHours(long workingDuration)
//package com.java2s; //License from project: Apache License import java.math.BigDecimal; import java.math.RoundingMode; public class Main { public static double convertToHours(long workingDuration) { return BigDecimal.valueOf(workingDuration / (60.0 * 60.0 * 1000.0)).setScale(2, RoundingMode.HALF_UP) .doubleValue();//from www . ja v a2 s .c o m } }