I have a large set of Tweets and I need to retrieve tweets from one week period, one day period etc. So, I want to specify a start and end date and retrieve all the data that matches the query. Now, I have this code:
pac=timezone('US/Pacific')
utc=timezone('UTC')
start_created_at = datetime.strptime(tweet['created_at'], '%a %b %d %H:%M:%S +0000 %Y')
start_utc_created_at = utc.localize(start_created_at)
start_pac_created=start_utc_created_at.astimezone(pac)
which gives me an output like this
2014-01-11 10:51:11-08:00
I am still trying to learn how to manipulate date/time so I would appreciate any hints on how to perform queries and select tweets from a specific time period that does not require manually inputing the whole string but instead of that, something like 01/01/2014-01/10/2014 or something easily managable.