title: Python 3 - print if after specific time
body: <p>Is there anyway in Python 3 to check the hour and if its after a certain hour do an action (like print "it is the afternoon)?</p>
  
  <p>This is what I'm done already:</p>
  
  <pre><code>import time
  import datetime
  
  
  now = datetime.datetime.now().strftime("%d/%m/%y %H:%M:%S")
  hour = datetime.hour().strftime("%H")
  
  if (hour &gt; 12):
      print("it is the afternoon")
  
  print(now)
  </code></pre>
  
  <p>If I run it I get an AttributeError.</p>