Created
March 3, 2017 12:36
-
-
Save nikparmar/7db881bed9744b7d12cea08fdf0ea9f5 to your computer and use it in GitHub Desktop.
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
from datetime import datetime | |
def convert_twitter_date_time_to_object(twitter_date_time): | |
try: | |
#_date = datetime.strptime("Thu Feb 23 13:42:39 +0000 2017", '%a %b %d %H:%M:%S +0000 %Y') | |
_date = datetime.strptime(twitter_date_time, '%a %b %d %H:%M:%S +0000 %Y') | |
return _date | |
except Exception as e: | |
return e.message |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment