Here you can find the source of parseSegKeyDate4Display(String source)
Parameter | Description |
---|---|
source | a parameter |
Parameter | Description |
---|---|
ParseException | an exception |
public static String parseSegKeyDate4Display(String source) throws ParseException
//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)); } }