title: flask input date parsing
body: <p>I have a html form. But I am in trouble to get the date.
  I try to get the day/month/year. Look the html:</p>
  
  <pre><code>&lt;div class="form-group"&gt;
          &lt;label for="data-apreensao"&gt;data da apreensão&lt;/label&gt;
          &lt;input type="date" id="data-apreensao" name="data_apreensao" class="form-control" 
          format="dd/mm/yyyy" placeholder="DD-MM-YYYY"&gt;
        &lt;/div&gt;
  </code></pre>
  
  <p>and now the flask code:</p>
  
  <pre><code>@app.route('/cars/novo', methods=['GET','POST'])
  def addCarro():
      if request.method == 'POST':
          marca = request.form['marca']
          modelo = request.form['modelo']
          placa = request.form['placa']
          motivo = request.form['motivo']
          situacao = request.form['situacao']
          # HERE I GOT THE PROBLEM
          #data_apreensao = datetime.datetime.strptime(request.form['data_apreensao'], '%d, %m, %Y')
          data_apreensao = datetime.strptime(request.form['data_apreensao'], '%d, %m, %Y')
          print (data_apreensao)
          carros.append(Apreensao(marca,modelo, placa, motivo, situacao))
          return redirect('/cars')     
      return render_template('apreensaoForm.html', titulo='Nova Apreensao')
  </code></pre>
  
  <p>error:</p>
  
  <pre><code>ValueError
  ValueError: time data '2018-01-01' does not match format '%d, %m, %Y'
  </code></pre>
  
  <p>Can someone tell me what is wrong please?</p>