Java - 将日期类型格式化为字符串 代码如下:
SimpleDateFormat formater =?new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");System.out.println(formater.format(new Date()));