Source Code:
(back to article)
from datetime import date, datetime # create a date object date_object = date(2022, 12, 25) # convert date to datetime datetime_object = datetime.combine(date_object, datetime.min.time()) print(datetime_object) # Output: 2022-12-25 00:00:00
Result:
Report an issue