I am using tweepy to get a tweet. I am trying to send this tweet over Slack. Tweepy gives the time in a strange format, and Slack requires the time in epoch.
for i in tweets:
created=(i.created_at)
print(created)
print(created.strftime('%s'))
This returns
2017-01-17 14:36:26
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\slackbot3\run.py", line 287, in main
print(created.strftime('%s'))
ValueError: Invalid format string
How can I get 2017-01-17 14:36:26 into epoch time?