i m 试图比较目前的日期。
if now.strftime( %B-%d-%Y ) < (item_date_update[i].strftime( %B-%d-%Y )):
print(now.strftime( %B-%d-%Y ))
print(item_date_update[i].strftime( %B-%d-%Y ))
data_item_ready.append(item_date_update[i].strftime( %B-%d-%Y ))
sn_item_ready.append(hf_comp.iloc[i][ Serial Number ])
comp_item_ready.append(hf_comp.iloc[i][ Component Type ])
output:
October-19-2023
September-15-2023
October-19-2023
September-15-2023
October-19-2023
September-15-2023
October-19-2023
September-15-2023
October-19-2023
October-22-2023
October-19-2023
October-23-2023
October-19-2023
October-29-2023
因此,它印刷的日期实际上比现在的(10-19-2023年)要大。
October-22-2023 October-23-2023 October-29-2023
页: 1
What am I doing wrong??
谢谢。
output i want:
October-19-2023
September-15-2023
October-19-2023
September-15-2023
October-19-2023
September-15-2023
October-19-2023
September-15-2023