parsing date string in python (convert string to date)
<p>I have a datetime string in the form of a string as:</p>

<pre><code>2011-10-23T08:00:00-07:00
</code></pre>

<p>How do i parse this string as the datetime object.</p>

<p>I did the following reading the documentation:</p>

<pre><code>date = datetime.strptime(data[4],"%Y-%m-%d%Z")
</code></pre>

<p>BUt I get the error</p>

<pre><code>  ValueError: time data '2011-10-23T08:00:00-07:00' does not match format '%Y-%m-%d%Z'
</code></pre>

<p>which is very clear.</p>

<p>But I am not sure how to read this format.</p>

<p>Any suggestions.
Thanks</p>

<p>Edit: Also, I must add, all I care about is the date part </p>
