title: Comparing a python date variable with timestamp from select query
body: <p>I want to take some action based on comparing two dates. Date 1 is stored in a python variable. Date 2 is retrieved from the database in the select statement. For example I want to retrieve some records from the database where the associated date in the record (in form of the timestamp) is later than the date defined by the python variable. Preferably, I would like the comparison to be in readable date format rather than in timestamps.</p>
  
  <p>I am a beginner with python. </p>
  
  <p>----edit -----
  Sorry for being ambiguous. Here's what I am trying to do:</p>
  
  <p>import MySQLdb as mdb 
  from datetime import datetime
  from datetime import date
  import time</p>
  
  <p>conn = mdb.connect('localhost','root','root','my_db')
  cur = conn.cursor()</p>
  
  <p>right_now = date.today()// python date </p>
  
  <h1>this is the part which I want to figure out</h1>
  
  <p>The database has a table which has timestamp. I want to compare that timestamp with this date and then retrieve records based on that comparison. For example I want to retrieve all records for which timestamp is above this date
  cur.execute("SELECT created from node WHERE timestamp > right_now")
  results = cur.fetchall()
  for row in results:
      print row</p>