public static long getCompareDate(String startDate,String endDate) throws ParseException {
SimpleDateFormat formatter=new SimpleDateFormat("yyyy-MM-dd");
Date date1=formatter.parse(startDate);
Date date2=formatter.parse(endDate);
long l = date2.getTime() - date1.getTime();
long d = l/(24*60*60*1000);
return d;
}
这段代码是求相差日期的,能否帮忙改一下让他成为相差分钟的呢