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
          主站蜘蛛池模板: 合阳县| 乌兰浩特市| 垫江县| 安泽县| 太仆寺旗| 西和县| 乐昌市| 宜兰市| 浮山县| 永城市| 阳朔县| 江华| 新平| 通榆县| 武义县| 平乡县| 土默特右旗| 浦东新区| 仙居县| 太仓市| 东乌| 丘北县| 寿宁县| 壶关县| 崇左市| 昆山市| 宣威市| 甘孜县| 洞头县| 永平县| 故城县| 昭平县| 托克逊县| 台山市| 凤翔县| 吉木乃县| 福安市| 淄博市| 武宣县| 襄樊市| 栾川县|