📜  在 python 代码示例中获取日期和时间

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

代码示例4
from datetime import datetime
now = datetime.now()
print (now.strftime("%Y-%m-%d %H:%M:%S"))