Java Date Convert dateToFMDate(Date date)

Here you can find the source of dateToFMDate(Date date)

Description

date To FM Date

License

Apache License

Declaration

public static double dateToFMDate(Date date) 

Method Source Code

//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;
    }
}

Related

  1. convertToStartOfDay(Date date)
  2. convertTweetDateToLong(String date)
  3. convertZeroHourDate(Date source)
  4. dateToCal(Date date)
  5. dateToEnglishString(java.util.Date date)
  6. dateToInt(Date date)
  7. dateToISOXDSb(Date date)
  8. dateToJulian(Date date)
  9. dateToLong(final Date date)