Java Parse Date Pattern YYYY parseSegKeyDate4Display(String source)

Here you can find the source of parseSegKeyDate4Display(String source)

Description

yyyyMMdd -> dd/MM/yyyy

License

Open Source License

Parameter

Parameter Description
source a parameter

Exception

Parameter Description
ParseException an exception

Declaration

public static String parseSegKeyDate4Display(String source) throws ParseException 

Method Source Code


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

public class Main {
    private static SimpleDateFormat sdf4Key = new SimpleDateFormat("yyyyMMdd");
    private static SimpleDateFormat sdf4Display = new SimpleDateFormat("dd/MM/yyyy");

    /**//from  ww w.  jav  a2 s.  c o m
     * yyyyMMdd -> dd/MM/yyyy
     * 
     * @param source
     * @return
     * @throws ParseException
     */
    public static String parseSegKeyDate4Display(String source) throws ParseException {
        return sdf4Display.format(sdf4Key.parse(source));
    }
}

Related

  1. parseResponseDate(String date)
  2. parseRoundTripDateString(String roundTripString)
  3. parseRSSDate(String dateStr)
  4. parseSalesDate(final String ymd)
  5. parseSecureDate(final String dateString)
  6. parseSessionTime(String response)
  7. parseSilently(String p_string)
  8. parseSimpleDate(String string, Date defaultDate)
  9. parseSipDateTime(String dateStr)