title: Python SQLITE3 SELECT query with datetime calculated string not working
body: <p>I have a SQLite3 DB with a table named <code>TEST_TABLE</code>, which looks like this:</p>
  
  <pre><code>("ID" TEXT,"DATE_IN" DATE,"WEEK_IN" number);
  </code></pre>
  
  <p>There are 2 entries in the table:</p>
  
  <pre><code>1|2012-03-25|13
  2|2013-03-25|13
  </code></pre>
  
  <p>I'm trying to write a query that returns the ID for week 13 of this year.
  I want to use the program again next year, so I cannot hardcode "2013" as the year.</p>
  
  <p>I used datetime to calculate a value for this year, creating a <code>datetime.date</code> object with content like this: "2013-01-01". I then converted this to a string:</p>
  
  <pre><code>this_year = (datetime.date(datetime.date.today().isocalendar()[0], 1, 1))
  test2 = ("'"+str(this_year)+"'")
  </code></pre>
  
  <p>Then I queried the SQLite DB:</p>
  
  <pre><code>cursr = con.cursor()
  con.text_factory = str
  cursr.execute("""select ID from TEST_TABLE where WEEK_IN = 13 and DATE_IN &gt; ? """,[test2])
  
  result = cursr.fetchall()
  print result
  
  [('1',), ('2',)]
  </code></pre>
  
  <p>This returns the IDs 1 and 2, but this is no good, because ID 1 has '2012' as the year.</p>
  
  <p>The strange thing is, if I don't use datetime for the string, but create the var manually, IT WORKS CORRECTLY.</p>
  
  <pre><code>test2 = ('2013-01-01')
  
  cursr.execute("""select ID from TEST_TABLE where WEEK_IN = 13 and DATE_IN &gt; ? """,[test2])
  result = cursr.fetchall()
  print result
  [('2',)]
  </code></pre>
  
  <p>So why won't the query work correctly when I create the string via datetime?
  A string is a string, right? So what am I missing here?</p>