title: AttributeError: 'str' object has no attribute 'datetime': Python
body: <p>This is my code:</p>
  
  <pre><code># Fetch today's date
  Date = datetime.today().strftime('%Y-%m-%d-%H.%M.%S')
  # Variable for log file 
  LogFile = os.getcwd()
  print(LogFile)
  os.mkdir("Logs12")
  f = open("Password_Expiry_Date_Log_"+(Date)+".txt", "w+")
  
  #Date Calculations
  Date_Before = Date.datetime(Days_Before)
  Days_After = Date.datetime(Days_After)
  </code></pre>
  
  <p>When I try to initialize the variable 'Date_Before', i get the error AttributeError: 'str' object has no attribute 'datetime'. However, I need date to be in a string format to write in into a text filename. Is there any workaround for this?</p>
  
  <p>Thanks in advance.</p>