Hi I have a stored procedure that is trying to pass datetime parameters @StartDate and @EndDate but when I run the query I get the following Error....
Arithmetic overflow error converting expression to data type datetime.
Below is my Stored Procedure....
I should note that The CENSUSDATEKEY field is an INT type I need to convert it to Datetime type
You need to be sure that there is valid data in the CensusDateKey column. One way of doing it is to execute a query using ISDATE function, something like
This will give you any invalid data. Not to mention, storing date data in other data types always gives pain.