当前位置:   article > 正文

java获取当前时间的年月日时分秒_java 年月日时分秒

java 年月日时分秒

方法: 

  1. public static String getFomartDate(String format){
  2.     return new SimpleDateFormat(format).format(new Date());
  3. }

调用:

String nowTime=getFomartDate("yyyy-MM-dd HH:mm:ss")

 

 

本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号