1.查找最接近指定日期的数据
select * FROM address_relation_test_0001 WHERE abs(create_time-convert(“20191107”,datetime))
in (SELECT MIN(abs(create_time-convert(“20191107”,datetime))) FROM address_relation_test_0001)
tt=“2018-12-16”
tmptime="{} 00:00:00".format(tt)
sql = “select * from presort_address_station_individual where create_time>=to_timestamp(’{}’,‘yyyy-MM-DD HH24:MI:SS’)”.format(tmptime)#