Java Number Convert convertToHours(long workingDuration)

Here you can find the source of convertToHours(long workingDuration)

Description

convert To Hours

License

Apache License

Declaration

public static double convertToHours(long workingDuration) 

Method Source Code


//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
    }
}

Related

  1. convertSizeG1DetailsToSizeG1(final String size, final char units)
  2. convertSizeToMB(long sizeInBytes)
  3. convertsToLong(double v)
  4. convertStringToObjectWrapper(String className, String value)
  5. convertToDecimal(Number n)
  6. convertToInchesOfMercury(double altimeterSetting, String unit)
  7. convertToJBPM(Object value)
  8. convertToKg(int value)
  9. convertToLong(String decimal, int precision)