yyyy-MM-dd日期格式转化成ddMMMyy日期格式

public class DateFormat {


public static void main(String[] args) throws ParseException {
String s= "2011-07-09 "; 
java.text.SimpleDateFormat formatter1 = new SimpleDateFormat( " yyyy-MM-dd ");
Date date =  formatter1.parse(s);


SimpleDateFormat formater = new SimpleDateFormat(" ddMMMyy",new Locale("US"));
String startDate = formater.format(date);

System.out.println(startDate);
}

}

你可能感兴趣的:(java)