将dd/MMM/yyyy:hh:mm:ss 时间格式转化为yyyy-MM-dd HH:mm:ss

    String dtime1 = "18/Sep/2013:06:49:18 +0000";
                SimpleDateFormat sdf1 = new SimpleDateFormat("dd/MMM/yyyy:hh:mm:ss Z", Locale.US);
                Date date = sdf1.parse(dtime);
                SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                String sDt = sdf2.format(date);

猜你喜欢

转载自blog.csdn.net/qq_41147260/article/details/80870218