Python
Python - Microsecond(마이크로초) 단위 문자열 변환하기
올엠
2024. 3. 14. 09:08
반응형
가장 기본적으로 많이 사용되는 시간 값은 소수점 6자리로 표현되는 Microsecond(마이크로초) 단위의 시간 값이라고 할 수 있다.

from datetime import datetime
str_datetime = '2023-12-18T15:47:56.599821'
convert_datetime = datetime.strptime(str_datetime, '%Y-%m-%dT%H:%M:%S.%f')
datetime.datetime(2023, 12, 18, 15, 47, 56, 599821)
반응형