[Java] LocalDateTime 값을 yyyyMMdd 문자열로 포맷팅
2023. 9. 5. 20:04
프로그래밍/JAVA
LocalDateTime을 문자열로 포맷팅 String formatDate = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")); System.out.println(formatDate);// 20230904 참고 자료 : https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html DateTimeFormatter (Java Platform SE 8 ) Parses the text using this formatter, without resolving the result, intended for advanced use cases. Parsing is ..