Created
April 19, 2019 08:39
-
-
Save seungwoonlee/12ec934b542ae24c0e2687e3f68ad456 to your computer and use it in GitHub Desktop.
maya 를 사용해서 날짜문자열을 날짜 데이터형으로 변환
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import maya # pip install maya 잘 설치가 안되는 듯, 될때까지 반복 | |
str = '2019-04-19 1:50:39 PM' | |
dt = maya.parse(str).datetime() | |
print(dt) | |
print(dt.date()) | |
print(dt.time()) | |
print(dt.tzinfo) # 기본적으로 UTC로 설정 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment