title: Python help: difficulty to pass the day date variable to sql
body: <p>Even though there are similar questions here I've tried over and over unsuccessfully so far.</p>
  <p>My python script charges into the variable &quot;code&quot; all the lines of the sql from sql.txt:</p>
  <pre><code>start_time = input(&quot;insert[dd-mm-yyyy]:&quot;)
  code = open(r'Query\sql.txt', 'r').read()
  final = cursor.execute(code).fetchall()
  </code></pre>
  <p>In sql.txt the sql code is performed by OPENQUERY statement:</p>
  <pre><code>SELECT * FROM OPENQUERY(GATEWAY,'SELECT * FROM meas_table WHERE daytime &gt;= to_date(''13-08-2020 00:00'', ''dd-mm-yyyy HH24:MI'') ')
  </code></pre>
  <p>How can I change the sql line to pass correctly the variable start_time got from the python script to the sql code?</p>