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 心。 閱讀(6113) 評論(3)  編輯  收藏 所屬分類: java
          主站蜘蛛池模板: 万宁市| 韩城市| 喀喇| 益阳市| 尚义县| 黑山县| 寿光市| 河南省| 永城市| 犍为县| 雅安市| 昆明市| 烟台市| 修水县| 房山区| 康定县| 池州市| 清河县| 漯河市| 博客| 将乐县| 新晃| 故城县| 柘城县| 开远市| 黔南| 兴安盟| 东方市| 旺苍县| 永宁县| 阿拉善盟| 崇仁县| 许昌县| 璧山县| 涟水县| 屯留县| 韩城市| 汝州市| 东阳市| 河间市| 铜川市|