init_date="20210727" now_time = datetime.datetime.strptime(init_date, "%Y%m%d").strftime(‘%Y-%m-%d‘) print(now_time)
2023-12-27 12:52:33
init_date="20210727" now_time = datetime.datetime.strptime(init_date, "%Y%m%d").strftime(‘%Y-%m-%d‘) print(now_time)