LocalDateTime与DateTimeFormatter

LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")): 2019-04-17 17:38:57
now.format(DateTimeFormatter.ISO_LOCAL_DATE):     2019-04-17
now.format(DateTimeFormatter.ISO_DATE):           2019-04-17
now.format(DateTimeFormatter.ISO_LOCAL_TIME):     17:38:57.062
now.format(DateTimeFormatter.ISO_TIME):           17:38:57.062
now.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME):2019-04-17T17:38:57.062
now.format(DateTimeFormatter.ISO_DATE_TIME):      2019-04-17T17:38:57.062
now.format(DateTimeFormatter.ISO_ORDINAL_DATE):   2019-107
now.format(DateTimeFormatter.ISO_WEEK_DATE):      2019-W16-3
now.format(DateTimeFormatter.BASIC_ISO_DATE):     20190417
上一篇:Springboot 接口实体 时间序列化、反序列


下一篇:LocalDateTime相关日期时间类转换