yyyy-mm-dd如何转yyyymmdd
可以使用字符串的replace方法将"-"替换为"/",例如:
date_str = "2021-06-01"
date_str = date_str.replace("-", "/")
print(date_str)
输出结果为:"2021/06/01"
原文地址: https://www.cveoy.top/t/topic/ZAt 著作权归作者所有。请勿转载和采集!
安全问答是一个知识全球问答,包含丰富的问答知识
可以使用字符串的replace方法将"-"替换为"/",例如:
date_str = "2021-06-01"
date_str = date_str.replace("-", "/")
print(date_str)
输出结果为:"2021/06/01"
原文地址: https://www.cveoy.top/t/topic/ZAt 著作权归作者所有。请勿转载和采集!