samedi 6 juin 2015

Comparing dates from from two different sources

I am using Tweepy API and storing tweets in a sqlite3 database. I am able to get the date and time using a function in Tweepy. it stores the value in the database as

2015-06-06 23:06:19

I then need to determine if the age of this date is greater than 30 days if so it needs to delete the row in the database.

c.execute ("DELETE FROM storedTweets WHERE tweetDate < DATE() - 30")

This is what I have so far but the query isn't deleting entries.

I'm sure this is simple, but I'm new to this. Thanks in advance

Aucun commentaire:

Enregistrer un commentaire