日期:2014-05-19 浏览次数:20786 次
double d1 = 41012.623599537; Calendar base = Calendar.getInstance(); SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd "); SimpleDateFormat outFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); base.setTime(format.parse("1899-12-30 ")); base.add(Calendar.DATE, (int) d1); base.add(Calendar.MILLISECOND, (int) ((d1 % 1) * 24 * 60 * 60 * 1000)); System.out.println("Time=" + outFormat.format(base.getTime()));