获取系统当前时间---年月日

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_41650354/article/details/82467611

   public  static Date getTimeYMHS() throws ParseException {

          Date dt  =  new  Date();

      SompleDateFormat  format   =   new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

      String  str  =  format.format(dt);

      return   format.parse(str);

}

猜你喜欢

转载自blog.csdn.net/qq_41650354/article/details/82467611