public static String changeStringToDate2(String str){

        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date date6 = null;
        try {
            date6 = sdf.parse(str);
            java.sql.Date date7 = new java.sql.Date(date6.getTime());
            return date7.toString();
        } catch (ParseException e) {
            e.printStackTrace();
            return "";
        }
    }
@param str
           ==>yyyy-MM-dd HH:mm:ss
@param
@return
           ==>2009-12-10
app/src/main/java/com/zhao/myreader/util/DateHelper.java