Python Get Today Date Without Time

August 9, 2019

To get datetime.date

import datetime

today = datetime.date.today()

If you need datetime.datetime

import datetime

today = datetime.datetime.today()
today = today.replace(hour=0, minute=0, second=0, microsecond=0)
This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.