title: Convert a set datetime to epoch time
body: <p>Need to convert the time 00:00:00 of each day to epoch time, below is the code I have:</p>
  
  <pre><code>import datetime
  today = datetime.datetime.now()
  today_morning = today.strftime('%y%m%d') + "000000"
  epoch = int(today_morning.strftime('%s'))
  print(epoch)
  </code></pre>
  
  <p>I get the following error:</p>
  
  <blockquote>
    <p>AttributeError: 'str' object has no attribute 'strftime'</p>
  </blockquote>
  
  <p>If anyone has any advice, please share it. I have looked around at other answers, but they seem to be for Python 2.X and for the current time, not a predetermined time. I am looking for Python 3.X answers.</p>