Created
May 29, 2015 13:29
-
-
Save erochest/a8e9832f1c60dee0556c to your computer and use it in GitHub Desktop.
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
import datetime | |
input_time = 'Fri May 29 09:23:40 EDT 2015' | |
parsed = datetime.datetime.strptime(input_time, '%a %b %d %H:%M:%S %Z %Y') | |
print(parsed.toordinal()) | |
# 735747 | |
print(str(parsed)) | |
# 2015-05-29 09:23:40 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment