def get_time(record):
    """Gets and formats the time found in the course record.

    :param record: Dictionary containing the course record.
    :returns:      The formatted time in the format 'HH:MM - HH:MM'
    """
    try:
        meeting_time = record["meetingsFaculty"][0]["meetingTime"]
        begin_time = meeting_time["beginTime"]
        end_time = meeting_time["endTime"]
    except (KeyError, IndexError):
        return None

    if None in (begin_time, end_time):
        return None

    begin_time = begin_time[0:2] + ":" + begin_time[2:]
    end_time = end_time[0:2] + ":" + end_time[2:]
    return f"{begin_time} - {end_time}"