Conversion of a varchar data type to a datetime data type resulted in an out-of-range value in SQL query

Try ISDATE() function in SQL Server. If 1, select valid date. If 0 selects invalid dates. Click here to view result EDIT : As per your update i need to extract the date only and remove the time, then you could simply use the inner CONVERT or EDIT 2 : The major reason for the error will be in your … Read more

Conversion of a varchar data type to a datetime data type resulted in an out-of-range value in SQL query

Try ISDATE() function in SQL Server. If 1, select valid date. If 0 selects invalid dates. Click here to view result EDIT : As per your update i need to extract the date only and remove the time, then you could simply use the inner CONVERT or EDIT 2 : The major reason for the error will be in your … Read more