Error when using SQL alias function with datetime
An error occurred in the report definition when passing an SQLalias function, which takes a datetime parameter as a datetime filter.
An error occured on executing the query for the report definition - There was a problem getting a list: code: 241 SQLState: S0001 Message:
Conversion failed when converting date and/or time from character string. DatabaseException caused by prior exception:
com.microsoft.sqlserver.jdbc.SQLServerException: Conversion failed when converting date and/or time from character string. | SQL Code: 241 | SQL
Steps to Reproduce
- Create a report definition.
- Pass a custom-SQL function for a datetime filter, which takes a date time parameter.
A defect in Pegasystems' code or rules:
When SQL alias function was used, the datetime property value was not resolved in SQL server leading to the error.