The error occurs when SQL Server fails to convert a string to a valid date format. Try explicitly converting the date column using TRY_CONVERT()
or TRY_CAST()
to handle incorrect values gracefully.
SELECT TRY_CONVERT(DATE, your_date_column, 120) FROM your_table;