Java Date Format Pattern getMM(Date date)

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

Description

get MM

License

Open Source License

Declaration

public static String getMM(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 {
    private static final SimpleDateFormat DATE_FORMAT2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    private static final SimpleDateFormat DATE_FORMAT6 = new SimpleDateFormat("MM");

    public static String getMM(Date date) {
        return DATE_FORMAT6.format(date);
    }/*www .  ja  v  a 2s.  c  o  m*/

    public static String format(Date date) {
        return DATE_FORMAT2.format(date);
    }
}

Related

  1. getFormatters()
  2. getFormatToSecsForFilename()
  3. getHeaderFormat()
  4. getLenientFormat(String format)
  5. getMM()
  6. getMM(String strDate)
  7. getMMdd()
  8. getMMDDYYHHMM()
  9. getMMDDYYYY(final Date date, final String separator)