日期时间参数


 1 /**
 2      * 获取数据库ID编号
 3      * @param head
 4      * @return
 5      */
 6     public static String getKeyId(String head) {
 7         Date date = new Date();
 8         SimpleDateFormat myFmt = new SimpleDateFormat("yyyyMMddHHmmssSSS");
 9         return head + myFmt.format(date) + getRandom();
10     }
工作中遇到获取数据库ID时不知道后面三个SSS什么意思,特地查阅资料总结了一下.最后一个值是-0800;

 

 

posted @ 2017-12-01 23:02  龙芳伟  阅读(275)  评论(0编辑  收藏  举报