티스토리 뷰
728x90
반응형
크롤링 하던중 시간 format을 보고 경악하여 찾아 봄
timeStr = 'Jun 10, 2020 4:09:43 PM'
Thistime = datetime.strptime(timeStr, '%b %d, %Y %I:%M:%S %p')
print(Thistime)
#2020-06-10 16:09:43
https://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior
8.1. datetime — Basic date and time types — Python 2.7.18 documentation
8.1. datetime — Basic date and time types The datetime module supplies classes for manipulating dates and times in both simple and complex ways. While date and time arithmetic is supported, the focus of the implementation is on efficient attribute extrac
docs.python.org
반응형
'Python' 카테고리의 다른 글
Python datetime 날짜의 월이 영어일때, 12시 pm, am처리 (0) | 2020.07.06 |
---|---|
Baekjoon 백준 12790번 Mini Fantasy War (0) | 2020.02.21 |
Baekjoon 백준 2751번 수 정렬하기 2 (0) | 2020.02.21 |
tesseract-OCR 환경변수 (0) | 2020.02.11 |
ncloud python3 boto3 s3 오브젝트 스토리지 업로드 예제 object storage upload example (0) | 2019.11.21 |
Python Oracle cx_oracle연동 (0) | 2019.11.04 |
댓글
티스토리 방명록
- Total
- 134,296
- Today
- 6
- Yesterday
- 24
Blog is powered by
Tistory / Designed by
Tistory
Contact: j0n9m1n1@gmail.com
Contact: j0n9m1n1@gmail.com