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

x = datetime.datetime.now()

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