Java Year Month getYearMonth()

Here you can find the source of getYearMonth()

Description

get Year Month

License

Apache License

Declaration

public static String getYearMonth() 

Method Source Code


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

import java.text.SimpleDateFormat;

public class Main {
    public static String getYearMonth() {
        String yearMonth = "";
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
        yearMonth = sdf.format(new java.util.Date());
        return yearMonth;
    }/*from www. j a v a  2s.c o  m*/
}

Related

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