I ran into an issue in a SQL stored procedure where I was using ISDATE to test a string before stuffing it into a date column
Except guess what: sometimes ISDATE returns true but it won’t successfully go in a date column. For example, something formatted like this:
Fortunately there is a better solution: use TRY_CONVERT:
SELECT TRY_CONVERT(datetime, 'january,25,1999')
This stackoverflow post got me to the right solution. Phew.