title: AttributeError: 'str' object has no attribute 'strftime' in python
body: <p>I need to run a script where I have to change the date of the day in several fields in the code, but I'm having trouble for the script to get the date of the day alone, it only gets the date manually in this format:</p>
  <pre><code>import datetime as date  
  
  Data_inicio = dt.date(2020,3, 1) #Ano, mês, Dia #here
  Data_Fim =    dt.date(2021,10,29)
  </code></pre>
  <p>I tried to change the code this way:</p>
  <pre><code>import datetime as date  
  
  data = date.datetime.now()
  data_today = data.strftime(&quot;%Y,%m,%d&quot;)
  Data_inicio = dt.date(2020,3, 1) 
  Data_Fim = dt.date(data_today) 
  </code></pre>
  <p>or</p>
  <pre><code>Data_Fim = data_today 
  </code></pre>
  <p>The following error occurs in <code>data_fim</code>:</p>
  <pre><code>files=glob.glob(url+'/*'+Data_inicio.strftime(&quot;%d%b%Y&quot;)+'-'+Data_Fim.strftime(&quot;%d%b%Y&quot;)+'.txt')
  files_inativos =glob.glob(url_inativos+'/*'+ '.txt')
  files = files + files_inativos
  
  
  AttributeError: 'str' object has no attribute 'strftime'
  </code></pre>