Support Article
Report shows wrong date for external table in DB2
SA-19520
Summary
DB2 database was used. One day is taken off for columns that are set to Date data type when a report definition was used to get some results in external class. However, it works fine when looked up for single data set and a data page with Lookup source was used.
Property in Pega is of DateTime type.
Error Messages
Not Applicable
Steps to Reproduce
1. Create and run report definition on external class with at least one Date or DateTime property. Ensure that the property is set to Date data type in database.
2. Compare results with a Lookup data page, which looks up for an instance from the same table.
Root Cause
There is a date problem with DB2, but the Help file explains how to resolve this.
Resolution
IBM's DB2 Date data type corresponds to the Pega Date property type. This data type does not contain any time information. Use the DB2 DateTime data type with the Pega DateTime property to store a date with time.
The DB2 Time data type does not correspond to any Pega property type. Use a DB2 VARCHAR(8) to map a Time property to a DB2 column.
Published February 26, 2016 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.