import datetime
now = datetime.datetime.now()
# 2024-07-24 23:21:47.729362
print(now.date())
import time
now = time.localtime()
# 2024-07-24 23:21:50
print(time.strftime("%Y-%m-%d %H:%M:%S", now))
04-03
7240
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
03-13
7938
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
07-20
406
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)