Executing procedure in Job conversion error

  • I am totally puzzled. I have a procedure that updates and populates a table. A varchar column is present in the source table that automatically converts to a datetime type in the destination table. To make sure this worked I also put a cast within the code. When I run the job manually it runs fine and the records are inserted or updated, however if I execute the procedure within a job it breaks with the error "The conversation of a char data type to a datetime data type resulted in an out-of-range datetime value". Please can anyone help! 😀

  • I would say this is down to different dateformats being set at the connection level.

    One thing to check would be the language of the accounts in question as I am guessing they differ. For example you might be set as English British which formats dates DMY and the Agent might be English which formats MDY, which converts values differently.

    Todays QotD relates to this issue

  • Brilliant thank you very much! 😀

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply