首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

失去当前时间

2012-08-28 
得到当前时间??Date currentTime new Date()DateFormat dataFormat new SimpleDateFormat(yyyyMMddH

得到当前时间

?

?

  Date currentTime = new Date();          DateFormat dataFormat = new SimpleDateFormat("yyyyMMddHHmmss");//设置显示格式          String nowTime = dataFormat.format(currentTime);//用DateFormat的format()方法在dt中获取并以yyyy/MM/dd HH:mm:ss格式显示         

?

?

?

?

?

?

热点排行