那是你直接运行了这个date2second2函数,而没有输入参数x_cell,正确的用法是:
x_cell = {'2021年09月02日19时16分42秒', '2021年09月02日20时36分02秒', '2021年09月02日21时21分22秒'}; date2second2(x_cell)
直接在命令行粘贴这段代码就可以运行