title: "import datetime" v.s. "from datetime import datetime"
body: <p>I have a script that needs to execute the following at different lines in the script:</p>
  
  <pre><code>today_date = datetime.date.today()
  date_time = datetime.strp(date_time_string, '%Y-%m-%d %H:%M')
  </code></pre>
  
  <p>In my <code>import</code> statements I have the following:</p>
  
  <pre><code>from datetime import datetime
  import datetime
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre class="lang-none prettyprint-override"><code>AttributeError: 'module' object has no attribute 'strp'
  </code></pre>
  
  <p>If I change the order of the <code>import</code> statements to:</p>
  
  <pre><code>import datetime
  from datetime import datetime
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre class="lang-none prettyprint-override"><code>AttributeError: 'method_descriptor' object has no attribute 'today'
  </code></pre>
  
  <p>If I again change the <code>import</code> statement to:</p>
  
  <pre><code>import datetime
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre class="lang-none prettyprint-override"><code>AttributeError: 'module' object has no attribute 'strp'
  </code></pre>
  
  <p>What is going on here and how do I get both to work?</p>