Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Error when using SQL alias function with datetime

SA-31506

Summary



An error occurred in the report definition when passing an SQLalias function, which takes a datetime parameter as a datetime filter.

Error Messages



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
State: S0001


Steps to Reproduce

  1. Create a report definition.
  2. Pass a custom-SQL function for a datetime filter, which takes a date time parameter.

Root Cause



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.


Resolution



Apply HFix-30833.
Suggest Edit

Published January 19, 2017 - Updated October 8, 2020

Did you find this content helpful? Yes No

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us