static images ret imp () date() ges 时间 alt
- /**
- * 获取数据库ID编号
- * @param head
- * @return
- */
- public static String getKeyId(String head) {
- Date date = new Date();
- SimpleDateFormat myFmt = new SimpleDateFormat("yyyyMMddHHmmssSSS");
- return head + myFmt.format(date) + getRandom();
- }
- 工作中遇到获取数据库ID时不知道后面三个SSS什么意思,特地查阅资料总结了一下.最后一个值是-0800;
日期时间参数
来源: http://www.bubuko.com/infodetail-2414041.html