from datetime import datetime


def convert_to_date(transaction_date: str):
    """Convert the date-time string(dd/mm/yyyy hh:min_) to date time object"""
    if type(transaction_date) == str:
        date_, time = transaction_date.split()
        dd, mm, yyyy = [int(val) for val in date_.split("/")]
        hh, min_ = [int(val) for val in time.split(":")]
        return datetime(year=yyyy, month=mm, day=dd, hour=hh, minute=min_)
    return transaction_date