I have troubles with a script: I need to call a stored procedure with a date parameter, but it doesn’t work. I always get the message “Error executing system.db.execSProcCall()” with “The conversion from UNKNOWN to DATE is unsupported”.
Note that I tried directly with the date format of ignition like system.date.now() and with a formated string value yyyY-MM-dd HH:mm:ss.SSS (the table has a datetime2 column).
When I run it in SQL Server Managment with the same values, it works fine.
From what I saw, I could run it with an EXEC in a runQuery, but it seems strange to me that registerInParam doesn’t work with a system.db.DATE.
Edit: didn’t manage to make it works with runQuery or runPrepQuery
Edit2: a coworker just find out it has to be system.db.VARCHAR with the formatted date to work.