title: Why is datetime.strptime not working in this simple example?
body: <p>I'm using <a href="http://docs.python.org/library/datetime.html#datetime.datetime.strptime" rel="noreferrer">strptime</a> to convert a date string into a <code>datetime</code>. According to the linked page, formatting like this should work:</p>
  
  <pre><code>&gt;&gt;&gt; # Using datetime.strptime()
  &gt;&gt;&gt; dt = datetime.strptime("21/11/06 16:30", "%d/%m/%y %H:%M")
  </code></pre>
  
  <p>My code is:</p>
  
  <pre><code>import datetime
  dtDate = datetime.strptime(sDate,"%m/%d/%Y")
  </code></pre>
  
  <p>where <code>sDate = "07/27/2012"</code>. (I understand, from the same page, that <code>%Y</code> is <em>"Year with century as a decimal number."</em>)</p>
  
  <p>I have tried putting the actual value of sDate into the code:</p>
  
  <pre><code>dtDate = datetime.strptime("07/27/2012","%m/%d/%Y")
  </code></pre>
  
  <p>but this does not work. The error I get is:</p>
  
  <blockquote>
    <p>AttributeError: 'module' object has no attribute 'strptime'</p>
  </blockquote>
  
  <p>What am I doing wrong?</p>