Support Article
Date property type is shown TIMESTAMP at Pega side
SA-27980
Summary
Properties of type Date are mapped the Oracle DB column of type TIMESTAMP. A date parse error is getting thrown at runtime.
Error Messages
message_1 ** cannot parse date/time "20150328" in property your_Dt: code: <none> SQLState: <none> Message: <none>
Steps to Reproduce
1. On the Pega side declare a property with type as Date.
2. In the Oracle DB have the corresponding mapping column with type as TIMESTAMP.
3. Run the work object and enter the date.
4. Runtime error gets thrown stating that the date was not able to parse.
Root Cause
A defect or configuration issue in the operating environment:
In this scenario a wrong mapping is used.
The correct mapping is as given below:
1. If a property on Pega side is set as DateTime then corresponding column in Oracle DB should be of type DATE.
2. And, if a property on Pega side is set as Date then corresponding column in Oracle DB should be of type VARCHAR2(8)
Resolution
Make the following changes to the operating environment:
1. On the Pega side declare a property with type as Date.
2. In the Oracle DB have the corresponding mapping column with type as VARCHAR2(8).
3. Restart the server.
4. Run the work object and enter the date.
5. Check for successful execution and no error is getting thrown.
Published September 21, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.