How do I convert a datetime.datetime
object (e.g., the return value of datetime.datetime.now())
to a datetime.date
object in Python?
Use the date()
method:
datetime.datetime.now().date()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With