Here you can find the source of formatYyyyMm(Date date)
Parameter | Description |
---|---|
date | a parameter |
public static String formatYyyyMm(Date date)
//package com.java2s; //License from project: LGPL import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; public class Main { /** DateFormat for "YYYYMM". */ public static DateFormat formatYyyyMm() { return new SimpleDateFormat("yyyyMM"); }//from w w w. java 2 s . c o m /** * Formats a date object to "YYYYMM". * @param date * @return */ public static String formatYyyyMm(Date date) { if (date == null) { return ""; } return formatYyyyMm().format(date); } }