Java Year Format toYYYYMMDD(Calendar cal)

Here you can find the source of toYYYYMMDD(Calendar cal)

Description

to YYYYMMDD

License

Open Source License

Declaration

public static String toYYYYMMDD(Calendar cal) 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Calendar;

public class Main {
    /** Formatteur de date */
    private static SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");

    public static String toYYYYMMDD(Calendar cal) {
        return sdf.format(cal.getTime());
    }/*from  w w  w  .ja va2 s  .c o  m*/
}

Related

  1. isYYYY(String strDate)
  2. lastDayOfWeek(String year, int week, String format)
  3. stringYYYYmmDDhhMMssToDate(String value)
  4. toDateString(String ddMMMyyyy)
  5. toYYYYMM(Date date)
  6. toYyyyMMddToDate(String date)
  7. unmarshalYYYYMMDD(String date)
  8. yyyyMMdd(Date date)
  9. yyyyMMdd(Date date)