def parse_date_input(input, formats=DT_INPUT_FORMATS):
    """Parse the datetime input ``input`` using the ``formats``.
    
    If input cannot be parsed a :exc:`ValueError` is raised. 
    """

    for fmt in formats:
        try:
            return datetime.datetime.strptime(input, fmt)
        except (ValueError):
            pass
    raise ValueError(vars() % "'%(input)s' is not a valid datetime.")
dataset/ETHPy150Open amorton/cassback/cassback/dt_util.py/parse_date_input/swapped operands of `%`