Python strftime ('% Y-%m-%d') is not recognized

it"s OK for me to call df = ts.get_tick_data ("601688 dating records 2015-08-25"), but I can"t call it up when I replace it with the function
begin = datetime.date (2015
df = ts.get_tick_data ("% Y-%m-%d")). I think it"s because the begin.strftime ("% Y-%m-%d") server recognizes it incorrectly. Is there any way to output begin.strftime ("% Y-%m-%d") locally as a number and then quote it as a number? Or how should I change the function so that it can be recognized?
there is no problem with the current operation, but the data called out shows that there is no data on the same day. The date identified by the server may not be the same as what I want to enter. I tried a lot of dates with data like this
ask for your help! Thank you!

Mar.23,2021

remove the quotation marks from date


the foundation of python needs to be strengthened

-sharpdf = ts.get_tick_data('601688',date='begin.strftime("%Y-%m-%d")') 
df = ts.get_tick_data('601688',date=begin.strftime("%Y-%m-%d")) 
Menu