def get_datetime_format(columnname):
    """ extract format from column-name, return: list of format strings
    """
    k2 = columnname.split(',')
    if len(k2) == 3:
        dt_fmt = k2[2]
        dt_typ = k2[1]
        f1 = ['y', 'Y', 'm', 'd', 'H', 'M', 'S']
        fnd1 = False
        for i in f1:
            if '%%%s' % i in dt_fmt:
                fnd1 = True
                break
        if fnd1 == False:
            raise ValueError(
                'no format string found in column name, expected %%Y %%y %%m %%d %%H %%M %%S (was: %s)'
                 % columnname)
        dt_fmt = [dt_fmt]
    elif len(k2) == 2:
        if k2[1].lower() == 'd':
            dt_fmt = ['%Y-%m-%d', '%d.%m.%Y', '%d-%m-%Y', '%Y/%m/%d',
                '%d/%m/%Y', '%m/%d/%Y', '%Y%m%d']
            dt_typ = 'd'
        elif k2[1].lower() == 't':
            dt_fmt = ['%H:%M', '%H:%M:%S']
            dt_typ = 't'
        elif k2[1].lower() == 'dt':
            dt_fmt = ['%Y-%m-%d %H:%M:%S', '%Y/%m/%d %H:%M:%S',
                '%d.%m.%Y %H:%M']
            dt_typ = 'dt'
    else:
        raise ValueError(
            'invalid column-name: datetime/date/time --> DT|D|T[,<format string>] (was: "%s")'
             % columnname)
    return dt_fmt, dt_typ
