Java Year Month getYearMonth(Date date)

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

Description

get Year Month

License

Open Source License

Declaration

public static String getYearMonth(Date date) 

Method Source Code

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

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {

    public static String getYearMonth(Date date) {
        if (null == date) {
            return null;
        }//www . j  a  va  2  s  .  c o  m
        SimpleDateFormat yearFormat = new SimpleDateFormat("yyyyMM");
        return yearFormat.format(date);
    }
}

Related

  1. getTimeByYearMonth(String yearMonth, String timeZone)
  2. getYearAndMonth()
  3. getYearMonth()
  4. getYearMonth()
  5. getYearMonth(Calendar sDate)
  6. getYearMonth(Date date)
  7. getYearMonth(String dateString)
  8. getYearMonth(String year)
  9. getYearMonthDate()