Here you can find the source of dateToFMDate(Date date)
public static double dateToFMDate(Date date)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; public class Main { public static double dateToFMDate(Date date) { Calendar calendar = Calendar.getInstance(); calendar.setTime(date);//from ww w. ja v a2 s . c o m int y = calendar.get(Calendar.YEAR); int m = calendar.get(Calendar.MONTH); int d = calendar.get(Calendar.DAY_OF_MONTH); int datePart = ((y - 1700) * 10000) + ((m + 1) * 100) + d; return datePart; } }