Here you can find the source of dateToDouble(Object value)
public static Double dateToDouble(Object value)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.TimeZone; import javax.xml.bind.DatatypeConverter; public class Main { public static Double dateToDouble(Object value) { Double ret = new Double(0.); if (value != null && value instanceof String) { TimeZone.setDefault(TimeZone.getTimeZone("UTC")); try { Calendar cal = DatatypeConverter.parseDateTime((String) value); long diff = cal.getTimeInMillis() + 2209161600000l; //30.12.1899 ret = diff / 86400000.;//from w w w.j a v a 2 s . co m } catch (IllegalArgumentException e) { } TimeZone.setDefault(null); } return ret; } }