Here you can find the source of getMonthNo(Date date)
public static String getMonthNo(Date date) throws ParseException
//package com.java2s; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String getMonthNo(Date date) throws ParseException { SimpleDateFormat sdFormatter = new SimpleDateFormat("yyyyMM"); return sdFormatter.format(date); }/*from www .j a v a 2 s .c o m*/ }