Develop/Flutter
Flutter 플러터 날짜 포맷 DateFormat yyyyMMdd 형식으로 표현하기
issuemaker99
2024. 8. 13. 14:44
728x90
플러터에서 기본으로 제공하는 라이브러리로는 날짜포맷을 사용자 정의 할 수가 없습니다
그래서 라이브러리 설치로 해결할 수 있습니다.
intl 라이브러리 설치
flutter pub add intl
소스 예제
var today = DateTime.now();
print(DateFormat('yyyy-MM-dd - HH:mm:ss').format(today));
print(DateFormat('yyyyMMdd').format(today));
LIST