Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- Set-ExecutionPolicy RemoteSigned
- 비밀번호만료
- missing or invalid password(s)
- 개발스터디
- 25년기사필기
- 플러터 생존코딩
- 정보처리기사필기문제
- exportSchema
- 파이썬 시간
- 스터디
- 리눅스마스터 2차
- the password has expired
- 정보처리기사 벼락치기
- round()
- sqlitebrowser.org/
- 파이썬
- 글자색 투명
- 모각코후기
- MPAndroid
- get-help Set-ExecutionPolicy
- 코뮤니티
- 정보처리기사필기복원
- 9시간 차이
- 온라인 코딩 스터디
- DB Browser for SQLite
- 합격
- 오류
- 소수점 출력
- 모각코
- db
Archives
- Today
- Total
기-억하기 위해 기-록을
[Python] 파이썬 시간을 한글 포맷하다 생긴 오류 본문
return 하는 과정에서 encode, decode 처리를 하니 해결되었다.
def format_datetime(value, fmt='%Y년 %m월 %d일 %H:%M'):
return value.strftime(fmt.encode('unicode-escape').decode()).encode().decode('unicode-escape')
참고 자료 : bugs.python.org/issue8304
'Python' 카테고리의 다른 글
[Python] 소수점 자리 수 출력 - round(), format() (0) | 2021.04.05 |
---|---|
[Python] 장고 admin 시간 (0) | 2021.02.18 |