📜  在 python 代码示例中更改月份名称

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

代码示例1
month_name = "Jan"
datetime_object = datetime.datetime.strptime(month_name, "%b")
month_number = datetime_object.month
print(month_number)
OUTPUT