title: How do I convert string to a date in rethinkdb using python?
body: <p>My rethinkdb stores data in the following format.</p>
  
  <pre><code>data = [{
        'appName': "app1",
        'startTime': "Mon, 14 Feb 2017 05:10:00 GMT",
        'endTime': "Mon, 14 Feb 2017 05:15:00 GMT",
        'status': "SUCCESS"
      },
      {
        'appName': "app1",
        'startTime': "Mon, 13 Feb 2017 05:10:00 GMT",
        'endTime': "Mon, 13 Feb 2017 05:15:00 GMT",
        'status': "FAILED"
      },
      {
        'appName': "app2",
        'startTime': "Mon, 13 Feb 2017 05:10:00 GMT",
        'endTime': "Mon, 13 Feb 2017 05:15:00 GMT",
        'status': "RUNNING"
      }]
  </code></pre>
  
  <p>I need to fetch the latest information for all apps.</p>
  
  <pre><code>r.table('apps').group('appName').max('startTime').run()
  </code></pre>
  
  <p>But since my startTime is stored as a string, I can not do a max operation.</p>
  
  <p>I tried updating the values in the table as follows,</p>
  
  <pre><code>r.table('apps').update({'startTimeDate': pytz.timezone('Europe/Rome').localize(datetime.strptime(r.row['startTime'], '%a, %d %b %Y %H:%M:%S GMT'))}).run()
  </code></pre>
  
  <p>I receive an error:</p>
  
  <blockquote>
    <p>TypeError: must be string, not Bracket</p>
  </blockquote>
  
  <p>How do I persist startTime and endTime as date in rethinkdb from string?</p>