Hello I have a SPROC that runs an update query. The update query uses a function as part of the WHERE clause. The function takes in a start and end date and also start time and end time and returns working time.
When I run the SPROC in query analyser it runs fine but then when I call the SPROC from a Job to run over night it doesn't work giving the error message
"The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. [SQLSTATE 22007] (Error 242). The step failed."