how to only get the date datetime.now python code example Example: convert datetime to date python datetime.datetime.now().date()