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
          主站蜘蛛池模板: 资溪县| 涡阳县| 汕头市| 宜良县| 桂东县| 开阳县| 长阳| 庄河市| 沾化县| 红安县| 息烽县| 绵竹市| 西充县| 凤庆县| 武鸣县| 确山县| 枣庄市| 吉林市| 吉安县| 景宁| 新巴尔虎左旗| 五寨县| 密云县| 嘉黎县| 民县| 南宫市| 阿图什市| 伽师县| 南靖县| 武夷山市| 肇源县| 永州市| 洛南县| 平定县| 涟水县| 柘城县| 新津县| 镇雄县| 堆龙德庆县| 四川省| 马尔康县|