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