datetime return only date python code example Example: python datetime date only # Use the date() method: datetime.datetime.now().date()