<s>[INST] Convert date to datetime in Python Silly question, but is there a built-in method for converting a date to a datetime in Python, ie. getting the datetime for the midnight of the date? The opposite conversion is easy - datetime has a .date() method. Do I really have to manually call datetime(d.year, d.month, d.day) ?
 [/INST] You can use datetime.combine(date, time); for the time, you create a datetime.time object initialized to midnight.
from datetime import date
from datetime import datetime
d = date.today()
datetime.combine(d, datetime.min.time())

 </s>