public static String getComparedSBQDate(String yxqq,String starttime){ String str = starttime; SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd", Locale.CHINA); try { Date d1 = sdf.parse(yxqq); Date d2 = sdf.parse(starttime); if(d1.before(d2)){ str = starttime; }else{ str = yxqq; } } catch (ParseException e) { e.printStackTrace(); } return str; }
时间: 2024-10-18 23:32:48