📌  相关文章
📜  'str' 对象没有属性 'strftime' - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:25.335000             🧑  作者: Mango

代码示例2
# You should use datetime object, not str.

from datetime import datetime
cr_date = datetime(2013, 10, 31, 18, 23, 29, 227) # don't use str here
cr_date.strftime('%m/%d/%Y')