Hello,I'd like some help please if possible.I have a table that has a Holiday Date column in it. This column isn't actually stored as a date though, it's stored as a char(10) and this can't be changed.I've then created a view and added a column called 'Week Commencing' using the code below :DATEADD(DD, 1 - DATEPART(DW, HolidayDate), HolidayDate)
I've also cast the Holiday Date column as a datetime.When I run this view it runs fine, but when I scroll down the end using SQL EM I get the error message below :[Microsoft][ODBC SQL Server Driver][SQL Server] The conversion of a char data type to a datetime data type resulted in an out of range datetime value
Does anyone know why this is, and how I can fix it ?I thought it may be a problem with one of the values in the Holiday Date field, but everything seems to be in order.Is there any way I can track where this error is coming from ?Thank you in advance.