Answers for "python date only"

26

datetime python

from datetime import datetime as d
date = d.now()
print(date.strftime("%Y-%m-%d %H:%M:%S"))
Posted by: Guest on December-09-2020
1

python datetime date only

# Use the date() method:
datetime.datetime.now().date()
Posted by: Guest on April-09-2021

Python Answers by Framework

Browse Popular Code Answers by Language