我已经解决了 谢谢大家
SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
format.format(new Date(System.getCurrentTimeMillis()));
/**
* 获取方便识别的当前时间毫秒数,如20151103173941521
*/
public static Long getCurTime() {
return Long.parseLong(SDF_TIME_NUM.format(new Date()));
}
public static Long getCurTime(String date) {
if (StringUtils.isBlank(date)) {
return null;
}
Long curTime = null;
try {
curTime = Long.parseLong(SDF_TIME_NUM.format(SDF_TIME.parse(date)));
} catch (ParseException e) {
e.printStackTrace();
}
return curTime;
}
4 回答1.4k 阅读✓ 已解决
4 回答1.2k 阅读✓ 已解决
1 回答2.6k 阅读✓ 已解决
2 回答733 阅读✓ 已解决
2 回答1.7k 阅读
2 回答1.7k 阅读
2 回答1.3k 阅读
统计今天已经保存的工单数量,查表count
今天的流水号,用SimpleDateFormat就可以了