• Luis Cazares - Thursday, December 14, 2017 9:01 AM

    What happens if you run the following query?

    SELECT YAB
    FROM UD_Indiv_Data
    WHERE YAB IS NOT NULL
    AND TRY_CAST( YAB AS DATETIME) IS NULL;

    If you get rows, then those rows are not valid dates.

    I got the following error:
    Msg 242, Level 16, State 3, Line 1
    The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.