• Nothing wrong with the syntax, so you must have values in the column that aren't a valid date value.

    Look at the following examples:

    DECLARE @lastrundate INT='20130228'

    SELECT CONVERT(date, CONVERT(VARchar(18), @lastrundate))

    --success

    DECLARE @lastrundate INT='20130229'

    SELECT CONVERT(date, CONVERT(VARchar(18), @lastrundate))

    --failure

    You'll need to find the invalid date values before converting.