Java Date Convert dateToISOXDSb(Date date)

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

Description

date To ISOXD Sb

License

Open Source License

Declaration

public static String dateToISOXDSb(Date date) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Calendar;
import java.util.Date;

public class Main {
    public static String dateToISOXDSb(Date date) {

        if (date == null) {
            return null;
        }//  w ww. j av a2  s .  c  o m

        Calendar c = Calendar.getInstance();
        c.setTime(date);
        int ano = c.get(Calendar.YEAR);
        int mes = c.get(Calendar.MONTH) + 1;
        int dia = c.get(Calendar.DAY_OF_MONTH);
        int hour = c.get(Calendar.HOUR_OF_DAY);
        int min = c.get(Calendar.MINUTE);
        int sec = c.get(Calendar.SECOND);

        return String.valueOf(ano * 10000000000L + mes * 100000000 + dia
                * 1000000 + hour * 10000 + min * 100 + sec);
    }
}

Related

  1. convertZeroHourDate(Date source)
  2. dateToCal(Date date)
  3. dateToEnglishString(java.util.Date date)
  4. dateToFMDate(Date date)
  5. dateToInt(Date date)
  6. dateToJulian(Date date)
  7. dateToLong(final Date date)
  8. DateToMask(Date javaDateType)
  9. dateToMorining(Date date)