Java Month Format formatMonth(String dateOrign)

Here you can find the source of formatMonth(String dateOrign)

Description

format Month

License

Open Source License

Declaration

public static String formatMonth(String dateOrign) 

Method Source Code


//package com.java2s;
import java.text.SimpleDateFormat;

import java.util.Locale;

public class Main {
    public static String formatMonth(String dateOrign) {

        String dateString = "";
        try {//ww  w .j av a2  s .  c o m
            dateString = new SimpleDateFormat("ddMMMyyyy", Locale.US)
                    .format(new SimpleDateFormat("yyyy-MM-dd").parse(dateOrign));
        } catch (Exception e) {
            // TODO: handle exception
            return "";
        }
        return dateString;

    }
}

Related

  1. formatMonth(Date date)
  2. formatMonth(final Date date)
  3. formatMonth(final int year, final int month)
  4. formatMonth(int month)
  5. formatMonth(int month, Locale locale, boolean longFormat)
  6. formatMonthDay(int decimal)
  7. formatMonthlyPeriod(String month)
  8. getAfterByNMonth(String format, int months)
  9. getCurrMonthFirstDaySlashFormat()