import datetime
def dt_time_min(dt):
"""converts any datetime/date to new datetime with same date and time=0:00:00"""
return datetime.datetime.combine(dt, datetime.time.min)
def dt_time_max(dt):
"""converts any datetime/date to new datetime with same date and time=23:59:59.999999"""
return datetime.datetime.combine(dt, datetime.time.max)