日期時間參數

 
 
 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;

相關文章
相關標籤/搜索