I'm trying to filter my SQL code in Python using a specified date in my where statement. For some reason it isn't filtering based on the date and I'm unsure why. Want to filter on report_dt > '2018-01-01' but result output is giving all data
import pandas as pd
startdate='2018-01-01'
test=pd.read_sql("""SELECT top 10 report_dt FROM db.table where report_dt>{} """.format(startdate) , connection)
print(test)
REPORT_DT
0  2014-02-15
1  2014-02-15
2  2014-02-15
 
     
     
    