def parseDates(data, dataloggerConfig=None, date_col_names=None, clean=True,
    verbose=False, connector=''):
    """
    Author: Tomas Chor
    date: 2015-08-10
    This routine parses the date from a pandas DataFrame when it is divided into several columns

    Parameters
    -----------
    data: pandas DataFrame
        dataFrame whose dates have to be parsed
    date_col_names: list
        A list of the names of the columns in which the date is divided
        the naming of the date columns must be in accordance with the datetime directives,
        so if the first column is only the year, its name must be `%Y` and so forth.
        see https://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior
    connector: string
        should be used only when the default connector causes some conflit
    first_time_skip: int
        the offset (mostly because of the bad converting done by LBA
    clean: bool
        remove date columns from data after it is introduced as index

    Returns
    -------
    pandas.DataFrame
        data indexed by timestamp
    """
    import pandas as pd
    if dataloggerConfig:
        date_col_names = dataloggerConfig.date_col_names
    elif date_col_names == None:
        raise NameError('Must provide either fileConfig or date_col_names')
    if verbose:
        print('Using these columns: ', date_col_names)
    date_format = connector.join(date_col_names)
    try:
        aux = data[date_col_names[0]].astype(str)
    except ValueError:
        aux = data[date_col_names[0]].astype(int).astype(str)
    for col in date_col_names[1:]:
        aux += connector + data[col].astype(str)
    dates = pd.to_datetime(aux, format=date_format)
    data = data.set_index([dates])
    data.index.name = 'Timestamp'
    if clean:
        data = data.drop(date_col_names, axis=1)
    return data
