Created
March 9, 2018 18:25
-
-
Save dario61081/66138b7cfe6eb549626e04cd60ab4187 to your computer and use it in GitHub Desktop.
conversion de str to date
This file contains hidden or 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
>>> datetime.strptime(cr_date, '%Y-%m-%d %H:%M:%S.%f') | |
datetime.datetime(2013, 10, 31, 18, 23, 29, 227) | |
>>> datetime.strptime(cr_date, '%Y-%m-%d %H:%M:%S.%f').strftime('%m/%d/%Y') | |
'10/31/2013' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment