Here you can find the source of getMillisFromHours(String hours)
public static long getMillisFromHours(String hours)
//package com.java2s; //License from project: Open Source License public class Main { public static long getMillisFromHours(String hours) { try {//from w ww . j a va2s .c om double numHours = Double.parseDouble(hours); double millisDouble = (numHours * 3600 * 1000); return (long) millisDouble; } catch (NumberFormatException e) { return 0; } } }