Here you can find the source of formatOLETime(double oleTime)
public static String formatOLETime(double oleTime)
//package com.java2s; /*/*from w w w .ja va 2 s .c o m*/ * #%L * dzplugin * $Id:$ * $HeadURL:$ * %% * Copyright (C) 2014 juxeii * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program. If not, see * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static final int DAYS_SINCE_UTC_EPOCH = 25569; private static SimpleDateFormat simpleUTCormat; public static String formatOLETime(double oleTime) { long dateTime = getMillisFromOLEDate(oleTime); return formatDateTime(dateTime); } public static long getMillisFromOLEDate(double oleDate) { Date date = new Date(); date.setTime((long) ((oleDate - DAYS_SINCE_UTC_EPOCH) * 24 * 3600 * 1000)); return date.getTime(); } public static String formatDateTime(long dateTime) { return simpleUTCormat.format(new Date(dateTime)); } }