title: Python julian date format
body: <p>I have a function in django that check for selected date and then convert that date to julian date then it extract data from the database based on the selected date.</p>
  
  <p>but i am getting an error:      </p>
  
  <p>time data 'selected_date' does not match format '%Y-%M-%d'</p>
  
  <p>my view.py</p>
  
  <p>def sum_asset_fundmanager(request):</p>
  
  <pre><code>if "selectdate" in request.POST:
      selected_date = request.POST["selectdate"]
          if selected_date==selected_date:
          convert=datetime.datetime.strptime("selected_date", "%Y-%M-%d").toordinal()
          #calculating date MID Rate
          engine=create_engine('mssql+pymssql://username:password1@hostname /db')
          connection=engine.connect()
          metadata=MetaData()
          rate=Table('mccurtdt',metadata,autoload=True,autoload_with=engine)
          statmt=select([rate])
  
          statmt=statmt.where(and_(rate.columns.from_currency=='AUD',     rate.columns.rate_type=='MID',rate.columns.convert_date==convert))
          CORP101=connection.execute(statmt).fetchall()
  </code></pre>
  
  <p>return render(request,'template.html',locals())</p>
  
  <p>my template.html</p>
  
  <p>Select a Date:</p>
  
  {% csrf_token %}