代码示例:(标识:python_datetime_strftime_d)
python_datetime_strftime_d.py
import datetime

x = datetime.datetime.now()

print(x.strftime("%d"))
运行结果: