时间类

SimpleDateFormat time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date curDate = new Date(System.currentTimeMillis());
long sytime=0;
try {
   sytime=curDate.getTime()-time.parse(order.getCreateTime()).getTime();
} catch (ParseException e) {
   e.printStackTrace();
}

你可能感兴趣的:(android)