SimpleDateFormat parser = new SimpleDateFormat("EEEE, MM dd, yyyy");
SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy");
Date date;
date = parser.parse(date1);
output = formatter.format(date);
日期1「星期日,2013年3月3日」如何將此字符串轉換爲SimpleDateFormat「dd-MM-yyyy」?
你讀過SimpleDateFormat的javadoc嗎? – 2013-03-03 17:01:51
nope,但現在我有,現在它的作品「EEEE,MMMMM d,yyyy」:D – 2013-03-03 17:11:12