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
          主站蜘蛛池模板: 高台县| 普格县| 铜鼓县| 福建省| 乌鲁木齐县| 邮箱| 色达县| 沾益县| 房产| 丰城市| 兴安县| 乌拉特中旗| 晋宁县| 志丹县| 龙井市| 汝南县| 康马县| 临沧市| 德令哈市| 印江| 镇原县| 湟中县| 怀柔区| 青海省| 盈江县| 米易县| 赤壁市| 江源县| 弥勒县| 清远市| 静乐县| 山阳县| 蓬莱市| 克拉玛依市| 南江县| 葵青区| 安福县| 长沙县| 石渠县| 朝阳区| 怀安县|