def get_data_by_time(path, columns, dates, start_time='00:00', end_time='23:59'):
    """Extract columns of data from a ProCoDA datalog based on date(s) and time(s)

    Note: Column 0 is time. The first data column is column 1.

    :param path: The path to the folder containing the ProCoDA data file(s)
    :type path: string
    :param columns: A single index of a column OR a list of indices of columns of data to extract.
    :type columns: int or int list
    :param dates: A single date or list of dates for which data was recorded, formatted "M-D-YYYY"
    :type dates: string or string list
    :param start_time: Starting time of data to extract, formatted 'HH:MM' (24-hour time)
    :type start_time: string, optional
    :param end_time: Ending time of data to extract, formatted 'HH:MM' (24-hour time)
    :type end_time: string, optional

    :return: a list containing the single column of data to extract, OR a list of lists containing the columns to extract, in order of the indices given in the columns variable
    :rtype: list or list list

    :Examples:

    .. code-block:: python

        data = get_data_by_time(path='/Users/.../ProCoDA Data/', columns=4, dates=['6-14-2018', '6-15-2018'], start_time='12:20', end_time='10:50')
        data = get_data_by_time(path='/Users/.../ProCoDA Data/', columns=[0,4], dates='6-14-2018', start_time='12:20', end_time='23:59')
        data = get_data_by_time(path='/Users/.../ProCoDA Data/', columns=[0,3,4], dates='6-14-2018')
    """
    data = data_from_dates(path, dates)

    first_time_column = pd.to_numeric(data[0].iloc[:, 0])
    start = max(day_fraction(start_time), first_time_column[0])
    start_idx = time_column_index(start, first_time_column)
    end_idx = time_column_index(day_fraction(end_time),
        pd.to_numeric(data[-1].iloc[:, 0])) + 1

    if isinstance(columns, int):
        return column_start_to_end(data, columns, start_idx, end_idx)
    else:
        result = []
        for c in columns:
            result.append(column_start_to_end(data, c, start_idx, end_idx))
    return result
Extract columns of data from a ProCoDA datalog based on date(s) and time(s)

    Note: Column 0 is time. The first data column is column 1.

    :param path: The path to the folder containing the ProCoDA data file(s)
    :type path: string
    :param columns: A single index of a column OR a list of indices of columns of data to extract.
    :type columns: int or int list
    :param dates: A single date or list of dates for which data was recorded, formatted "M-D-YYYY"
    :type dates: string or string list
    :param start_time: Starting time of data to extract, formatted 'HH:MM' (24-hour time)
    :type start_time: string, optional
    :param end_time: Ending time of data to extract, formatted 'HH:MM' (24-hour time)
    :type end_time: string, optional

    :return: a list containing the single column of data to extract, OR a list of lists containing the columns to extract, in order of the indices given in the columns variable
    :rtype: list or list list

    :Examples:

    .. code-block:: python

        data = get_data_by_time(path='/Users/.../ProCoDA Data/', columns=4, dates=['6-14-2018', '6-15-2018'], start_time='12:20', end_time='10:50')
        data = get_data_by_time(path='/Users/.../ProCoDA Data/', columns=[0,4], dates='6-14-2018', start_time='12:20', end_time='23:59')
        data = get_data_by_time(path='/Users/.../ProCoDA Data/', columns=[0,3,4], dates='6-14-2018')