标签: python python-3.x datetime
我有一个字符串(带有小时和秒的数据=“ 2020-02-02T11:00:00Z”),我正在尝试将其转换为自定义格式(20200201_110000)。
有人可以在python中使用任何内置函数(例如Java中的日历)吗?
谢谢
答案 0 :(得分:-2)
使用正则表达式根据需要进行转换
https://docs.python.org/2/library/re.html?highlight=regex
Regular expression for date format- dd-mm-yyyy in Javascript