티스토리 뷰
반응형
크롤링 하던중 시간 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' 카테고리의 다른 글
mac m1, m2 anaconda locust ValueError: greenlet.greenlet size changed, may indicate binary incompatibility (0) | 2023.08.06 |
---|---|
클라이언트 간 메시지 송수신 스터디(nginx + fastapi + celery + rabbitMQ) (0) | 2023.08.04 |
Baekjoon 백준 12790번 Mini Fantasy War (0) | 2020.02.21 |
Baekjoon 백준 2751번 수 정렬하기 2 (0) | 2020.02.21 |
tesseract-OCR 환경변수 (0) | 2020.02.11 |
티스토리 방명록
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
Blog is powered by
Tistory / Designed by
Tistory
Contact: j0n9m1n1@gmail.com
Contact: j0n9m1n1@gmail.com