Django: Convert string to datetime object
<p>Here is the datetime string:
<code>dt = '2016-04-07 23:00:00'</code></p>

<p>I have tried <code>datetime.strptime(year+"-"+day+"-"+month+" "+hour+":"+mins+":"+"00", '%Y-%d-%m %H:%M:%S')</code> but I get this error:</p>

<blockquote>
  <p>type object 'datetime.datetime' has no attribute 'datetime'</p>
</blockquote>