posts - 30,  comments - 50,  trackbacks - 0
          1。
          SimpleDateFormat tempDate = new SimpleDateFormat("yyyy-MM-dd" + " " + "hh:mm:ss");
          String datetime 
          = tempDate.format(new java.util.Date());

          2。
          Calendar now=Calendar.getInstance();
          String time
          =now.get(Calendar.YEAR)+"-"+(now.get(Calendar.MONTH)+1)+"-"+now.get(Calendar.DAY_OF_MONTH)+" "+now.get(Calendar.HOUR_OF_DAY)+":"+now.get(Calendar.MINUTE)+":"+now.get(Calendar.SECOND);
          posted on 2007-07-31 16:22 心。 閱讀(6119) 評論(3)  編輯  收藏 所屬分類: java
          主站蜘蛛池模板: 金堂县| 安顺市| 吉首市| 绿春县| 获嘉县| 星座| 通城县| 平塘县| 宜君县| 长丰县| 漳州市| 溆浦县| 民乐县| 临漳县| 正阳县| 永丰县| 上饶县| 锦州市| 东台市| 元氏县| 商洛市| 台前县| 阜宁县| 额敏县| 邛崃市| 高淳县| 元阳县| 昌邑市| 永宁县| 安远县| 西乌| 高淳县| 广安市| 伊宁县| 射阳县| 桃源县| 阿坝县| 昌都县| 瑞丽市| 鲁甸县| 巴楚县|