string datdString='Wed Oct 12 2016 00:00:00 GMT+0800 (中國標准時間)'將字符串轉化為date類型,格式2016-10-12
String datdString="Wed Oct 12 2016 00:00:00 GMT+0800 (中國標准時間)";
datdString = datdString.replace("GMT", "").replaceAll("\(.*\)", "");
//將字符串轉化為date類型,格式2016-10-12
SimpleDateFormat format = new SimpleDateFormat("EEE MMM dd yyyy hh:mm:ss z",Locale.ENGLISH);
Date dateTrans = format.parse(datdString);
System.out.println(new SimpleDateFormat("yyyy-MM-dd").format(dateTrans));