def date_to_datetime ( d ) : if not isinstance ( d , datetime ) : d = datetime . combine ( d , datetime . min . time ( ) ) return d
python add min to datetime
>>> date_to_datetime ( date ( 2000 1 2 )) datetime . datetime ( 2000 1 2 0 0 ) >>> date_to_datetime ( datetime ( 2000 1 2 3 4 5 )) datetime . datetime ( 2000 1 2 3 4 5 )
def date_to_datetime(d):
    """
    >>> date_to_datetime(date(2000, 1, 2))
    datetime.datetime(2000, 1, 2, 0, 0)
    >>> date_to_datetime(datetime(2000, 1, 2, 3, 4, 5))
    datetime.datetime(2000, 1, 2, 3, 4, 5)
    """
    if not isinstance(d, datetime):
        d = datetime.combine(d, datetime.min.time())
    return d