Java Year Format getStringFormatMMYYWithoutHyphens(Date aDate)

Here you can find the source of getStringFormatMMYYWithoutHyphens(Date aDate)

Description

get String Format MMYY Without Hyphens

License

Open Source License

Parameter

Parameter Description
aDate a parameter

Return

tring

Declaration


public static String getStringFormatMMYYWithoutHyphens(Date aDate) 

Method Source Code


//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    /**//from  w ww.j  a  v a2s  .c om
     *
     * @param aDate
     * @return tring
     *
     */
    /*==================================================================*/
    public static String getStringFormatMMYYWithoutHyphens(Date aDate) {
        SimpleDateFormat myFormatter = new SimpleDateFormat("MMyy");

        if (aDate != null) {
            String myFormattedDate = myFormatter.format(aDate);
            return myFormattedDate;
        }
        return null;
    }
}

Related

  1. getDDMMYYY_HHMM()
  2. getDDMMYYYYDate(Date date)
  3. getFirstDate(String yearMonthStr, String yearMonthFormat, String dateFormat)
  4. getFormatToDateSimple(String yyyyMMdd)
  5. getStartAndEndWeekOfMonth(int year, int month, int week, String format)
  6. getStringFormatYYYYMMddWithHyphens(Date aDate)
  7. getTimeByYMD()
  8. getYear(SimpleDateFormat df, String dateStr)
  9. getYear(String date, String dateformat)