title: Is there an as.Date() equivalent (R) in Python?
body: <p>Say we have a string:</p>
  
  <pre><code>string = "2014-12-04 04:07:59 &lt;font color='green'&gt; info:&lt;/font&gt; One, two, three, four, five."
  </code></pre>
  
  <p>In Python, I'd have to remove everything but <code>2014-12-04</code>, then use </p>
  
  <pre><code>time.mktime(datetime.datetime.strptime(string, "%Y-%m-%d").timetuple())
  </code></pre>
  
  <p>On the other hand, in R, all I have to do is <code>as.Date(string)</code> and I get the appropriate date, in date form. Does Python have something like this?</p>