포맷팅2 Python에서 printf 함수처럼 print 함수 사용하는 방법 % 스타일 포맷팅 print("%d %s" % (10000, 'lelecoder'), end='') {} 스타일 포맷팅 print("number={0}, name={1}".format(10000, 'lelecoder')) 2019. 6. 6. LocalDateTime 값을 yyyyMMdd 문자열로 포맷팅 String formatDate = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")); // 20190513으로 출력 System.out.println(formatDate); 참고자료 DateTimeFormatter Doc 문서 2019. 5. 13. 이전 1 다음