title: Not SELECTING data between two dates that are from different months in SQLite
body: <p>I am trying to write <a href="https://en.wikipedia.org/wiki/Microsoft_Excel#Current_file_extensions" rel="nofollow noreferrer">XLSX</a> from an SQLite table with a <em>WHERE</em> clause between two selected dates.</p>
  <p>Below is my example:</p>
  <pre><code>search_from = &quot;19-09-2020&quot;
  search_to   = &quot;19-10-2020&quot;
  
  conn=sqlite3.connect('project.db')
  writer      = pd.ExcelWriter(&quot;data.xlsx&quot;, engine='xlsxwriter')
  data = &quot;SELECT Pro_ID, Pro_Name, Pro_City FROM table WHERE `Started_Date` &gt;= ? and `Started_Date` &lt;= ?&quot;
  
  df_data         = pd.read_sql(data, conn, params=(search_from, search_to))
  df_data.to_excel(writer, sheet_name=&quot;Data&quot;)
  </code></pre>
  <p>It is selecting data if search_date and started_date are the same month, but not if they are in different months.</p>