DateTimeFormatter dateTimeFormatter=DateTimeFormatter.ofPattern("yyyy年MM月dd日HH时mm分ss秒");
System.out.println(LocalDateTime.now().format(dateTimeFormatter));
System.out.println(dateTimeFormatter.format(LocalDateTime.now()));
DateTimeFormatter dateTimeFormatter=DateTimeFormatter.ofPattern("yyyy年MM月dd日HH时mm分ss秒");
System.out.println(LocalDateTime.now().format(dateTimeFormatter));
System.out.println(dateTimeFormatter.format(LocalDateTime.now()));
本文标题:时间格式化
本文链接:https://www.haomeiwen.com/subject/hxxmprtx.html
网友评论