from datetime import datetime


def apply_strptime(dt, time_format):
    """Wrapper for adding exception catching to ``datetime.strptime``

    If ``datetime.strptime`` encounters a value it cannot encode into time-like
    form, the value is ignored.

    Args:
        dt (pandas Series): An array of timestamp entries.
        time_format (str): The expected format for timestamps.

    Returns:
        dt (pandas Series): A time-casted timestamp value.

    """
    try:
        dt = datetime.strptime(dt, time_format)
    except ValueError:
        pass
    return dt