# import re # s = '2020-10-9' # mat = re.search(r"(\d{4}-\d{1,2}-\d{1,2})",s) # print(mat) import time s = time.strftime('%Y-%m-%d', time.localtime(1598716628)) print(s)