Java Year Month getYearMonthDay(Date date)

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

Description

get Year Month Day

License

Apache License

Declaration

public static String getYearMonthDay(Date date) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static final String FORMAT12 = "yyyyMMdd";

    public static String getYearMonthDay(Date date) {

        SimpleDateFormat formatter = new SimpleDateFormat(FORMAT12);

        String currentTime = formatter.format(date);

        return currentTime;
    }/*w  w  w .  j  a va 2 s .  c  o  m*/
}

Related

  1. getYearMonth(String dateString)
  2. getYearMonth(String year)
  3. getYearMonthDate()
  4. getYearMonthDateByMisSecond(long misSecond)
  5. getYearMonthDay()
  6. getYearMonthDay(final int year, final int month, final int day)
  7. getYearMonthList(int year)
  8. getYearMonths(List time)
  9. getYearMonthStr(Date parseDate)